Why should drivers use usb_get_dev in probe, and usb_put_dev in disconnect?
No reason. A reference is already done by the core which covers the reference for that whole period of time.
A reference which is no longer valid after disconnect() ...
Hmm, that sounds like that other thread... a driver using that implicit reference after disconnect() returned would clearly have a refcount bug!
If you want to use the device structure longer than that, you need to keep a reference yourself.
It seems like another misunderstading.
But you're not saying that kind of usage would be incorrect, so I don't see what would have been mis-understood.
Only that more interesting examples -- like Greg's "urb completes after disconnect() returns" -- might also be added to that documentation.
Of course, if that's done, then probe/disconnect text could stand to be clarified: saying when refcounting for devices is implicitly being done.
- Dave
------------------------------------------------------- This SF.net email is sponsored by: SlickEdit Inc. Develop an edge. The most comprehensive and flexible code editor you can use. Code faster. C/C++, C#, Java, HTML, XML, many more. FREE 30-Day Trial. www.slickedit.com/sourceforge _______________________________________________ [EMAIL PROTECTED] To unsubscribe, use the last form field at: https://lists.sourceforge.net/lists/listinfo/linux-usb-devel
