aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/smc91x.c
diff options
context:
space:
mode:
authorRussell King <rmk@arm.linux.org.uk>2005-10-28 12:52:56 -0400
committerGreg Kroah-Hartman <gregkh@suse.de>2005-10-28 12:52:56 -0400
commit9480e307cd88ef09ec9294c7d97ebec18e6d2221 (patch)
tree967e26d3a23c24dd52b114d672312c207714308c /drivers/net/smc91x.c
parenta3a3395e487abc4c1371fe319a8ecbb3913a70a4 (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/smc91x.c')
-rw-r--r--drivers/net/smc91x.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/net/smc91x.c b/drivers/net/smc91x.c
index 1438fdd20826..0ddaa611cc61 100644
--- a/drivers/net/smc91x.c
+++ b/drivers/net/smc91x.c
@@ -2291,11 +2291,11 @@ static int smc_drv_remove(struct device *dev)
2291 return 0; 2291 return 0;
2292} 2292}
2293 2293
2294static int smc_drv_suspend(struct device *dev, pm_message_t state, u32 level) 2294static int smc_drv_suspend(struct device *dev, pm_message_t state)
2295{ 2295{
2296 struct net_device *ndev = dev_get_drvdata(dev); 2296 struct net_device *ndev = dev_get_drvdata(dev);
2297 2297
2298 if (ndev && level == SUSPEND_DISABLE) { 2298 if (ndev) {
2299 if (netif_running(ndev)) { 2299 if (netif_running(ndev)) {
2300 netif_device_detach(ndev); 2300 netif_device_detach(ndev);
2301 smc_shutdown(ndev); 2301 smc_shutdown(ndev);
@@ -2305,12 +2305,12 @@ static int smc_drv_suspend(struct device *dev, pm_message_t state, u32 level)
2305 return 0; 2305 return 0;
2306} 2306}
2307 2307
2308static int smc_drv_resume(struct device *dev, u32 level) 2308static int smc_drv_resume(struct device *dev)
2309{ 2309{
2310 struct platform_device *pdev = to_platform_device(dev); 2310 struct platform_device *pdev = to_platform_device(dev);
2311 struct net_device *ndev = dev_get_drvdata(dev); 2311 struct net_device *ndev = dev_get_drvdata(dev);
2312 2312
2313 if (ndev && level == RESUME_ENABLE) { 2313 if (ndev) {
2314 struct smc_local *lp = netdev_priv(ndev); 2314 struct smc_local *lp = netdev_priv(ndev);
2315 smc_enable_device(pdev); 2315 smc_enable_device(pdev);
2316 if (netif_running(ndev)) { 2316 if (netif_running(ndev)) {