On Thu, Sep 18, 2003 at 06:24:42PM -0700, David Brownell wrote: > Greg KH wrote: > >On Mon, Sep 15, 2003 at 03:42:05PM -0700, David Brownell wrote: > > > >> * Use device_del() not device_unregister(), which matches > >> with using device_add() to create the devices instead of > >> device_register() ... resolves one refcounting problem. > > > > > >Hm, how does it do that? > >If you want to call device_del() yourself, you have to do the final > >put_device() on the device. I don't see that happening here. What is > >the refcounting issue? > > It was the assumption that when interfaces de-activate then > usbcore is giving up its reference and should drop the count. > Not true unless they only de-activate during disconnection. > > Since usbcore is still keeping the config[i]->interface[j] > reference, dropping the refcount then would lead to oopsing > later when it got re-used. I got tired of oopsing. :)
Ok, doing that for the interfaces is fine, it makes sense, you can call device_add() after calling device_del() just fine. But it's the change to the main struct usb_device logic that calls device_del() that I'm questioning. I don't see the final put that is needed there. Why did you change that? 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
