On Wed, Sep 24, 2003 at 06:04:38PM -0700, David Brownell wrote:
> >>    /* Decrement the reference count, it'll auto free everything when */
> >>    /* it hits 0 which could very well be now */
> >>+   /* FIXME the decrement in device_unregister() should suffice ... */
> >>    usb_put_dev(dev);
> >
> >
> >Not true at all.  We need that last put_dev, as we called usb_get_dev in
> >the top of usb_new_device().
> 
> Then the fix should then be to remove both of those, yes?
> The comment doesn't imply that's the only thing to change... :)

Try it :)  From what I recall, we have to increment the count at this
point, as we increment it and decrement it when we start talking to the
device (getting the config and stuff.)  This is because when we submit a
urb, we increment the device's count.

It was because of this we added device_add() and device_initialize() to
the driver core to handle the two stage initialization.

thanks,

greg k-h


-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
_______________________________________________
[EMAIL PROTECTED]
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel

Reply via email to