On Wed, Feb 09, 2005 at 01:13:24PM -0800, Srdjan Sobajic wrote:
> Hi,
> 
> I was looking at the scanner.c driver in the 2.4.28 kernel tree, and I
> noticed that it does not use the usb_alloc_urb/usb_free_urb functions
> to allocate the URBs, instead relying on the creation of struct
> scn_usb_data (which contains the actual URB structs rather than
> pointers to them).
> 
> According to the documentation, you should always use the
> usb_alloc/free_urb functions to create/destroy URBs -- however,
> looking at the implementation of usb_alloc/free_urb, it seems that
> doing it manually is not different functionally. [I guess, if you
> don't use the _fill_ macros you should remember to initialize the spin
> lock, but that's about it.]

For 2.6, it's almost essential to call usb_alloc.  For 2.4 you could get
away with doing it yourself.

thanks,

greg k-h


-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click
_______________________________________________
[email protected]
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel

Reply via email to