> [initialisation by hand]
>
> > Yet it is ugly. It'll break whenever the internal URB handling is
> > changed.
>
> Yes. Absolutely.
>
> > It isn't really that hard to add a function to the API to do that.
> > In fact the attached patch does just that.
>
> I don't like your patch. Because:
> - you double the code which is in usb_alloc_urb()
Improved patch attached.
> - the user of urbs has to learn different ways to init his urbs.
He doesn't have to. You are free to use what you want.
> So there are two clean solutions:
> a) remove the initialisation from usb_alloc_urb. For all URBs, the
> initialisation has to be done by hand. Every user has to know this.
Unusable. You'd be better of with kmalloc then.
Encapsulation goes to hell.
> b) let usb_alloc_urb() be the only function which can create URBs.
> Do a single rewrite of all drivers which don't comply with this
> requirement. Shouldn't be so hard. End of story.
Also very bad. Drivers rarely need naked urbs. You'll end up with a number of
absolutely unnecessary calls to kmalloc.
Almost every other kernel object can either be allocated or initialised
except for urbs. Do the same for urbs. End of story.
Regards
Oliver
_______________________________________________
[EMAIL PROTECTED]
To unsubscribe, use the last form field at:
http://lists.sourceforge.net/lists/listinfo/linux-usb-devel