lkml.org 
[lkml]   [2008]   [Apr]   [5]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: 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



\
 
 \ /
  Last update: 2008-04-05 16:19    [W:0.052 / U:0.040 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site