diff options
author | Russell King <rmk@arm.linux.org.uk> | 2005-10-28 12:52:56 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2005-10-28 12:52:56 -0400 |
commit | 9480e307cd88ef09ec9294c7d97ebec18e6d2221 (patch) | |
tree | 967e26d3a23c24dd52b114d672312c207714308c /drivers/net/phy | |
parent | a3a3395e487abc4c1371fe319a8ecbb3913a70a4 (diff) |
[PATCH] DRIVER MODEL: Get rid of the obsolete tri-level suspend/resume callbacks
In PM v1, all devices were called at SUSPEND_DISABLE level. Then
all devices were called at SUSPEND_SAVE_STATE level, and finally
SUSPEND_POWER_DOWN level. However, with PM v2, to maintain
compatibility for platform devices, I arranged for the PM v2
suspend/resume callbacks to call the old PM v1 suspend/resume
callbacks three times with each level in order so that existing
drivers continued to work.
Since this is obsolete infrastructure which is no longer necessary,
we can remove it. Here's an (untested) patch to do exactly that.
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/net/phy')
-rw-r--r-- | drivers/net/phy/mdio_bus.c | 20 |
1 files changed, 6 insertions, 14 deletions
diff --git a/drivers/net/phy/mdio_bus.c b/drivers/net/phy/mdio_bus.c index 90630672703d..ad93b0da87f0 100644 --- a/drivers/net/phy/mdio_bus.c +++ b/drivers/net/phy/mdio_bus.c | |||
@@ -133,13 +133,9 @@ static int mdio_bus_suspend(struct device * dev, pm_message_t state) | |||
133 | int ret = 0; | 133 | int ret = 0; |
134 | struct device_driver *drv = dev->driver; | 134 | struct device_driver *drv = dev->driver; |
135 | 135 | ||
136 | if (drv && drv->suspend) { | 136 | if (drv && drv->suspend) |
137 | ret = drv->suspend(dev, state, SUSPEND_DISABLE); | 137 | ret = drv->suspend(dev, state); |
138 | if (ret == 0) | 138 | |
139 | ret = drv->suspend(dev, state, SUSPEND_SAVE_STATE); | ||
140 | if (ret == 0) | ||
141 | ret = drv->suspend(dev, state, SUSPEND_POWER_DOWN); | ||
142 | } | ||
143 | return ret; | 139 | return ret; |
144 | } | 140 | } |
145 | 141 | ||
@@ -148,13 +144,9 @@ static int mdio_bus_resume(struct device * dev) | |||
148 | int ret = 0; | 144 | int ret = 0; |
149 | struct device_driver *drv = dev->driver; | 145 | struct device_driver *drv = dev->driver; |
150 | 146 | ||
151 | if (drv && drv->resume) { | 147 | if (drv && drv->resume) |
152 | ret = drv->resume(dev, RESUME_POWER_ON); | 148 | ret = drv->resume(dev); |
153 | if (ret == 0) | 149 | |
154 | ret = drv->resume(dev, RESUME_RESTORE_STATE); | ||
155 | if (ret == 0) | ||
156 | ret = drv->resume(dev, RESUME_ENABLE); | ||
157 | } | ||
158 | return ret; | 150 | return ret; |
159 | } | 151 | } |
160 | 152 | ||