On 05/20/2011 09:29 AM, Laurent Pinchart wrote: [snip] >> I had an issue when tried to call request_module, to register subdev of >> platform device type, in probe() of other platform device. Driver's >> probe() for devices belonging same bus type cannot be nested as the bus >> lock is taken by the driver core before entering probe(), so this would >> lead to a deadlock. >> That exactly happens in __driver_attach(). >> >> For the same reason v4l2_new_subdev_board could not be called from probe() >> of devices belonging to I2C or SPI bus, as request_module is called inside >> of it. I'm not sure how to solve it, yet:) > > Ouch. I wasn't aware of that issue. Looks like it's indeed time to fix the > subdev registration issue, including the module load race condition. Michael, > you said you have a patch to add platform subdev support, how have you avoided > the race condition ? I spoke too soon. This deadlock is staring me in the face right now, too. Ouch, indeed. [snip] MATRIX VISION GmbH, Talstrasse 16, DE-71570 Oppenweiler Registergericht: Amtsgericht Stuttgart, HRB 271090 Geschaeftsfuehrer: Gerhard Thullner, Werner Armingeon, Uwe Furtner -- To unsubscribe from this list: send the line "unsubscribe linux-media" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html