diff options
author | David Brownell <david-b@pacbell.net> | 2005-05-12 15:06:27 -0400 |
---|---|---|
committer | Greg KH <gregkh@suse.de> | 2005-05-17 17:54:55 -0400 |
commit | 0b405a0f7e4d4d18fd1fe46ddf5ff465443036ab (patch) | |
tree | 49d74df6eddfdd095c650e0af34cde7f4548a2d5 /drivers/base/power/shutdown.c | |
parent | 82428b62aa6294ea640c7e920a9224ecaf46db65 (diff) |
[PATCH] Driver Core: remove driver model detach_state
The driver model has a "detach_state" mechanism that:
- Has never been used by any in-kernel drive;
- Is superfluous, since driver remove() methods can do the same thing;
- Became buggy when the suspend() parameter changed semantics and type;
- Could self-deadlock when called from certain suspend contexts;
- Is effectively wasted documentation, object code, and headspace.
This removes that "detach_state" mechanism; net code shrink, as well
as a per-device saving in the driver model and sysfs.
Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/base/power/shutdown.c')
-rw-r--r-- | drivers/base/power/shutdown.c | 16 |
1 files changed, 0 insertions, 16 deletions
diff --git a/drivers/base/power/shutdown.c b/drivers/base/power/shutdown.c index 97979901c149..f50a08be424b 100644 --- a/drivers/base/power/shutdown.c +++ b/drivers/base/power/shutdown.c | |||
@@ -19,22 +19,6 @@ | |||
19 | extern struct subsystem devices_subsys; | 19 | extern struct subsystem devices_subsys; |
20 | 20 | ||
21 | 21 | ||
22 | int device_detach_shutdown(struct device * dev) | ||
23 | { | ||
24 | if (!dev->detach_state) | ||
25 | return 0; | ||
26 | |||
27 | if (dev->detach_state == DEVICE_PM_OFF) { | ||
28 | if (dev->driver && dev->driver->shutdown) { | ||
29 | dev_dbg(dev, "shutdown\n"); | ||
30 | dev->driver->shutdown(dev); | ||
31 | } | ||
32 | return 0; | ||
33 | } | ||
34 | return dpm_runtime_suspend(dev, dev->detach_state); | ||
35 | } | ||
36 | |||
37 | |||
38 | /** | 22 | /** |
39 | * We handle system devices differently - we suspend and shut them | 23 | * We handle system devices differently - we suspend and shut them |
40 | * down last and resume them first. That way, we don't do anything stupid like | 24 | * down last and resume them first. That way, we don't do anything stupid like |