Driver core: remove use of rwsem
authorGreg Kroah-Hartman <gregkh@suse.de>
Mon, 9 Apr 2007 15:52:31 +0000 (11:52 -0400)
committerGreg Kroah-Hartman <gregkh@suse.de>
Fri, 27 Apr 2007 17:57:30 +0000 (10:57 -0700)
This lock is never used by the rest of the driver core, so the fact that
we are grabbing it here means it isn't correct...

Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/base/power/shutdown.c

index 3483ae4d57f59a09025d8d0c49d2100ea72c81ee..58b6f77a1b340f3bfc70527758c501be18ed6f52 100644 (file)
@@ -36,7 +36,6 @@ void device_shutdown(void)
 {
        struct device * dev, *devn;
 
-       down_write(&devices_subsys.rwsem);
        list_for_each_entry_safe_reverse(dev, devn, &devices_subsys.kset.list,
                                kobj.entry) {
                if (dev->bus && dev->bus->shutdown) {
@@ -47,7 +46,6 @@ void device_shutdown(void)
                        dev->driver->shutdown(dev);
                }
        }
-       up_write(&devices_subsys.rwsem);
 
        sysdev_shutdown();
 }