On Tuesday 30 August 2005 03.19, David Brownell wrote:
> > From: Daniel Ritz <[EMAIL PROTECTED]>
> > Date: Tue, 30 Aug 2005 00:39:36 +0200
> > 
> > ...
> >
> > if i didn't miss anything usb's check for knode_bus is also stupid 
> > workaround
> > to avoid a double device_bind_driver()...
> 
> USB is one of very few subsystems that really _needs_ to be using the
> two phase init()/add() driver model calls instead of register().
> The state machine for a usb_interface is way too complicated to use
> that single phase model!
> 

agreed. the device_bind_driver() API is just bad.
(besides the comment says it's safe to call if from a drivers .probe
 which is not really true)

> So those list checks just answer "has add(this) been called yet?",
> using a cheap list test.   It's not good to bind_driver() for a
> device that's not yet known to the driver model, for one thing ...
> 

i know, it made my rmmod hang :)
but the check in USB should be an API in the driver model like
alan stern mentions in another mail...

> - Dave
> 

rgds
-daniel


-------------------------------------------------------
SF.Net email is Sponsored by the Better Software Conference & EXPO
September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices
Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA
Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf
_______________________________________________
linux-usb-devel@lists.sourceforge.net
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel

Reply via email to