[lkml]   [2002]   [Sep]   [15]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: delay before open() works
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 that
usb_register() used to also register the fops structure at the same
time. Now that the functions are split apart, the call to
usb_register_dev() should be done at the same place as the call to
devfs_register(). Patches gladly accepted :)


greg k-h
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
More majordomo info at
Please read the FAQ at

 \ /
  Last update: 2005-03-22 13:28    [W:0.055 / U:0.064 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site