Re: Patch: linux-2.5.42/kernel/sys.c - warm reboot should not suspend devices

Eric W. Biederman (ebiederm@xmission.com)
20 Oct 2002 03:47:56 -0600


Assuming it is worth it to split remove into 2 parts, we need
the following so rmmod calls ->shutdown. Otherwise we will get
code duplication in the drivers.

And then we need all of the patches that split remove into 2 parts,
in the drivers.

Eric

diff -uNr linux-2.5.44/drivers/base/bus.c linux-2.5.44.shutdown/drivers/base/bus.c
--- linux-2.5.44/drivers/base/bus.c Sat Oct 19 00:57:58 2002
+++ linux-2.5.44.shutdown/drivers/base/bus.c Sun Oct 20 03:44:46 2002
@@ -164,6 +164,8 @@
if (drv) {
list_del_init(&dev->driver_list);
devclass_remove_device(dev);
+ if (drv->shutdown && device_present(drv))
+ drv->shutdown(dev);
if (drv->remove)
drv->remove(dev);
dev->driver = NULL;
-
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/