[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20070529092543.21ccd8ad@gondolin.boeblingen.de.ibm.com>
Date: Tue, 29 May 2007 09:25:43 +0200
From: Cornelia Huck <cornelia.huck@...ibm.com>
To: "Kay Sievers" <kay.sievers@...y.org>
Cc: "Tilman Schmidt" <tilman@...p.cc>,
"Andrew Morton" <akpm@...ux-foundation.org>,
linux-kernel@...r.kernel.org, "Greg KH" <greg@...ah.com>,
Matt Mackall <mpm@...enic.com>
Subject: Re: 2.6.22-rc2-mm1
On Mon, 28 May 2007 00:41:19 +0200,
"Kay Sievers" <kay.sievers@...y.org> wrote:
> Cornelia,
> in the patch is:
> + if (dev->kobj.parent == &dev->class->subsys.kobj)
> + return 0;
>
> which will skip the creation of the "device"-link, right?
...and this is certainly broken. Argl.
Could those folks that had trouble with this kernel check out whether
the following patch helps?
From: Cornelia Huck <cornelia.huck@...ibm.com>
Fix check when to create certain symlinks (the device link and some
compatible links).
Signed-off-by: Cornelia Huck <cornelia.huck@...ibm.com>
---
drivers/base/core.c | 18 ++++++++++--------
1 files changed, 10 insertions(+), 8 deletions(-)
--- linux-2.6.orig/drivers/base/core.c
+++ linux-2.6/drivers/base/core.c
@@ -657,12 +657,12 @@ static int device_add_class_symlinks(str
* If this is not a "fake" compatible device, then create the
* symlink from the class to the device.
*/
- if (dev->kobj.parent == &dev->class->subsys.kobj)
- return 0;
- error = sysfs_create_link(&dev->class->subsys.kobj, &dev->kobj,
- dev->bus_id);
- if (error)
- goto out_subsys;
+ if (dev->kobj.parent != &dev->class->subsys.kobj) {
+ error = sysfs_create_link(&dev->class->subsys.kobj, &dev->kobj,
+ dev->bus_id);
+ if (error)
+ goto out_subsys;
+ }
if (dev->parent) {
error = sysfs_create_link(&dev->kobj, &dev->parent->kobj,
"device");
@@ -689,7 +689,8 @@ out_device:
sysfs_remove_link(&dev->kobj, "device");
#endif
out_busid:
- sysfs_remove_link(&dev->class->subsys.kobj, dev->bus_id);
+ if (dev->kobj.parent != &dev->class->subsys.kobj)
+ sysfs_remove_link(&dev->class->subsys.kobj, dev->bus_id);
out_subsys:
sysfs_remove_link(&dev->kobj, "subsystem");
out:
@@ -712,7 +713,8 @@ static void device_remove_class_symlinks
#endif
sysfs_remove_link(&dev->kobj, "device");
}
- sysfs_remove_link(&dev->class->subsys.kobj, dev->bus_id);
+ if (dev->kobj.parent != &dev->class->subsys.kobj)
+ sysfs_remove_link(&dev->class->subsys.kobj, dev->bus_id);
sysfs_remove_link(&dev->kobj, "subsystem");
}
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists