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.] Is the documentation recommendation in place only for the future where the implementation of alloc/free_urb may do something to the underlying HC driver that would need to be allocated/cleaned up properly then? Or does something really subtle happen when calling usb_alloc/free_urb? Thanks for any info, Srdjan ------------------------------------------------------- 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
