On Sun, Feb 23, 2003, Duncan Sands <[EMAIL PROTECTED]> wrote: > The comment for usb_get_dev says: > > /** > * usb_get_dev - increments the reference count of the usb device structure > * @dev: the device being referenced > * > * Each live reference to a device should be refcounted. > * > * Drivers for USB interfaces should normally record such references in > * their probe() methods, when they bind to an interface, and release > * them by calling usb_put_dev(), in their disconnect() methods. > * > * A pointer to the device with the incremented reference counter is returned. > */ > > 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. If you want to use the device structure longer than that, you need to keep a reference yourself. It seems like another misunderstading. JE ------------------------------------------------------- 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
