Re: [PATCH] Driver Core update for 2.6.6-rc1

From: Greg KH
Date: Thu Apr 15 2004 - 13:08:14 EST


ChangeSet 1.1643.36.4, 2004/03/19 14:15:17-08:00, greg@xxxxxxxxx

Driver class: remove possible oops

This happens when the device associated with a class device goes away before
the class does.


drivers/base/class.c | 6 ++----
1 files changed, 2 insertions(+), 4 deletions(-)


diff -Nru a/drivers/base/class.c b/drivers/base/class.c
--- a/drivers/base/class.c Thu Apr 15 10:21:13 2004
+++ b/drivers/base/class.c Thu Apr 15 10:21:13 2004
@@ -155,8 +155,7 @@

static void class_device_dev_unlink(struct class_device * class_dev)
{
- if (class_dev->dev)
- sysfs_remove_link(&class_dev->kobj, "device");
+ sysfs_remove_link(&class_dev->kobj, "device");
}

static int class_device_driver_link(struct class_device * class_dev)
@@ -169,8 +168,7 @@

static void class_device_driver_unlink(struct class_device * class_dev)
{
- if ((class_dev->dev) && (class_dev->dev->driver))
- sysfs_remove_link(&class_dev->kobj, "driver");
+ sysfs_remove_link(&class_dev->kobj, "driver");
}



-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/