Messages in this thread |  | | Date | Sat, 5 Apr 2008 10:16:11 -0400 (EDT) | From | Alan Stern <> | Subject | Re: usb unbind/bind => WARNING at fs/sysfs/dir.c [Was: 2.6.25-rc8-mm1] |
| |
On Fri, 4 Apr 2008, Greg KH wrote:
> > Here's the answer. The bug was introduced when the definition of > > device_is_registered() in include/linux/device.h was changed. The old > > definition returned 0 when called inside a driver's remove method for a > > device being unregistered, whereas the new definition returns 1. I > > don't know when this change was made. > > I've changed that in the -mm tree to make some PCI stuff much easier. I > didn't realize that USB was depending on when this was being set, sorry > about it. > > I like your fix better, it makes the code path much simpler :)
Well, it's not really any _simpler_, since all I did was interchange two lines of code.
But I agree this way is better. It doesn't depend on the behavior of device_is_registered() in the ill-defined situation where the device is in the middle of being unregistered.
Alan Stern
|  |