lkml.org 
[lkml]   [2004]   [Apr]   [15]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
SubjectRe: [PATCH] Driver Core update for 2.6.6-rc1
Date
From
ChangeSet 1.1643.36.4, 2004/03/19 14:15:17-08:00, greg@kroah.com

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@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 14:02    [W:0.065 / U:0.024 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site