On Sun, Sep 15, 2002 at 04:38:32PM +1000, Brad Hards wrote:> On Sun, 15 Sep 2002 16:10, Greg KH wrote:> > This "second" hotplug event will happen when the driver registers with> > the "class". So for the example of the USB scanner driver, it registers> > itself with the USB "class" to set up the file_ops structure (this is> > done in usb_register_dev(). At that point in time, /sbin/hotplug will> > be called again.> This is too soon, at least for the scanner driver. Look at how much code runs > in scanner_probe() between the fops registration and the devfs registration.> > Hmmm, that is probably a race anyway. Oliver?

You're right, that is a race. And is due to the historical fact thatusb_register() used to also register the fops structure at the sametime. Now that the functions are split apart, the call tousb_register_dev() should be done at the same place as the call todevfs_register(). Patches gladly accepted :)