diff options
author | Russell King <rmk@arm.linux.org.uk> | 2006-01-05 09:29:51 -0500 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2006-01-13 14:26:04 -0500 |
commit | 594c8281f90560faf9632d91bb9d402cbe560e63 (patch) | |
tree | abeb32df086cfd204accad33b11040381c31689d /drivers/base/power | |
parent | bd37e5a951ad2123d3f51f59c407b5242946b6ba (diff) |
[PATCH] Add bus_type probe, remove, shutdown methods.
Add bus_type probe, remove and shutdown methods to replace the
corresponding methods in struct device_driver. This matches
the way we handle the suspend/resume methods.
Since the bus methods override the device_driver methods, warn
if a device driver is registered whose methods will not be
called.
The long-term idea is to remove the device_driver methods entirely.
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/base/power')
-rw-r--r-- | drivers/base/power/shutdown.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/drivers/base/power/shutdown.c b/drivers/base/power/shutdown.c index f50a08be424b..a47bb74da72b 100644 --- a/drivers/base/power/shutdown.c +++ b/drivers/base/power/shutdown.c | |||
@@ -40,7 +40,10 @@ void device_shutdown(void) | |||
40 | down_write(&devices_subsys.rwsem); | 40 | down_write(&devices_subsys.rwsem); |
41 | list_for_each_entry_reverse(dev, &devices_subsys.kset.list, | 41 | list_for_each_entry_reverse(dev, &devices_subsys.kset.list, |
42 | kobj.entry) { | 42 | kobj.entry) { |
43 | if (dev->driver && dev->driver->shutdown) { | 43 | if (dev->bus && dev->bus->shutdown) { |
44 | dev_dbg(dev, "shutdown\n"); | ||
45 | dev->bus->shutdown(dev); | ||
46 | } else if (dev->driver && dev->driver->shutdown) { | ||
44 | dev_dbg(dev, "shutdown\n"); | 47 | dev_dbg(dev, "shutdown\n"); |
45 | dev->driver->shutdown(dev); | 48 | dev->driver->shutdown(dev); |
46 | } | 49 | } |