Skip to contentSkip to conversation

driver core: Don't remove kobjects in device_shutdown.

PATCH New Eric W. Biederman 1 participant 1 message Nov 4, 2009 Driver core

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 driver core: Don't remove kobjects in device_shutdown.

device_shutdown is defined to just shutdown the hardware and to not clean up any kernel data structures. Therefore don't put the kobjects for /sys/dev and /sys/dev/block and /sys/dev/char.

This ensures we don't remove /sys/dev/block and /sys/dev/char while we still have symlinks from there to the actual devices.

---
 drivers/base/core.c |    3 ---
 1 files changed, 0 insertions(+), 3 deletions(-)
drivers/base/core.c +0 -3
index 6bee6af..3324d5a 100644
@@ -1728,8 +1728,5 @@ void device_shutdown(void)
 			dev->driver->shutdown(dev);
 		}
 	}
-	kobject_put(sysfs_dev_char_kobj);
-	kobject_put(sysfs_dev_block_kobj);
-	kobject_put(dev_kobj);
 	async_synchronize_full();
 }
Signature · 1 line
1.6.5.2.143.g8cc62