On Sunday, 17. June 2001 16:18, David Brownell wrote:
[spin_lock_init in usb_alloc_urb()]
> I'm not sure I see what the deal is. The FILL_*_URB() macros
> initialize URBs, including doing the spin lock init.
I was not aware of this...
So spin_lock_init() ist doubled: once in usb_alloc_urb(), once
in FILL_*_URB().
It is save to call spin_lock_init() twice for each architecture?
> So there is
> already an API functionality to do this; allocation and init are
> already separated.
So let's drop the init in usb_alloc_urb()?
> It's been pointed out that the URB fields aren't quite documented
> well enough, but any driver using those FILL_*_URB() macros
> to (re)init URBs is clearly doing a safe thing, and any driver that
> is NOT doing that is taking risks of some kind.
>
> A good API cleanup would be to turn these into inline functions
> and provide kernel doc, preferably with a name change (use
> lowercase names like usb_fill_XXX_urb etc); also probably
> define another variant for ISO urbs.
and define a macro doing all the init which is the same for all
FILL_*_URB macros ?
best regards
Wolfgang
_______________________________________________
[EMAIL PROTECTED]
To unsubscribe, use the last form field at:
http://lists.sourceforge.net/lists/listinfo/linux-usb-devel