]> err.no Git - linux-2.6/blobdiff - drivers/net/phy/mdio_bus.c
[PATCH] DRIVER MODEL: Get rid of the obsolete tri-level suspend/resume callbacks
[linux-2.6] / drivers / net / phy / mdio_bus.c
index 41f62c0c5fcb54c733243fe3799c81373316ae90..ad93b0da87f020b2e4c1de55f9de52db271bc089 100644 (file)
@@ -128,18 +128,14 @@ static int mdio_bus_match(struct device *dev, struct device_driver *drv)
 /* Suspend and resume.  Copied from platform_suspend and
  * platform_resume
  */
-static int mdio_bus_suspend(struct device * dev, u32 state)
+static int mdio_bus_suspend(struct device * dev, pm_message_t state)
 {
        int ret = 0;
        struct device_driver *drv = dev->driver;
 
-       if (drv && drv->suspend) {
-               ret = drv->suspend(dev, state, SUSPEND_DISABLE);
-               if (ret == 0)
-                       ret = drv->suspend(dev, state, SUSPEND_SAVE_STATE);
-               if (ret == 0)
-                       ret = drv->suspend(dev, state, SUSPEND_POWER_DOWN);
-       }
+       if (drv && drv->suspend)
+               ret = drv->suspend(dev, state);
+
        return ret;
 }
 
@@ -148,13 +144,9 @@ static int mdio_bus_resume(struct device * dev)
        int ret = 0;
        struct device_driver *drv = dev->driver;
 
-       if (drv && drv->resume) {
-               ret = drv->resume(dev, RESUME_POWER_ON);
-               if (ret == 0)
-                       ret = drv->resume(dev, RESUME_RESTORE_STATE);
-               if (ret == 0)
-                       ret = drv->resume(dev, RESUME_ENABLE);
-       }
+       if (drv && drv->resume)
+               ret = drv->resume(dev);
+
        return ret;
 }
 
@@ -170,7 +162,7 @@ int __init mdio_bus_init(void)
        return bus_register(&mdio_bus_type);
 }
 
-void __exit mdio_bus_exit(void)
+void mdio_bus_exit(void)
 {
        bus_unregister(&mdio_bus_type);
 }