Re: Problems with get_driver() and driver_attach() (and new_id too)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, 5 Jan 2012, Greg KH wrote:

> > If Greg confirms that there's nothing with registering the usb driver 
> > before the usb_serial driver, I can fix the usb-serial code easily.
> > 
> > Greg, do you know offhand whether this will break anything?  It really 
> > seems like the right thing to do, because the usb_serial driver uses 
> > the usb driver but not vice versa.
> 
> Hm, there was a reason I ordered the way I did, as I remember having to
> go fix up a number of drivers that did it in the reverse order.  Give me
> a day or so to dig it up and figure out what is going on here, and to
> review this thread.

Well, the one obvious problem, if one isn't careful about it, is that
serial devices present before the module is loaded won't bind properly.  
The usb driver will get probed before the usb_serial driver is
registered, and the probe will fail.

I can fix that easily enough by calling driver_attach() for the usb
driver after all the usb_serial drivers are registered.

Alan Stern

--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux