powerpc/vio: Switch VIO Bus PM to use generic helpers
authorBrian King <brking@linux.vnet.ibm.com>
Fri, 14 May 2010 12:04:41 +0000 (12:04 +0000)
committerBenjamin Herrenschmidt <benh@kernel.crashing.org>
Fri, 21 May 2010 07:31:09 +0000 (17:31 +1000)
Switch to use the generic power management helpers.

Signed-off-by: Brian King <brking@linux.vnet.ibm.com>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
arch/powerpc/kernel/vio.c

index b8e311d..9ce7b62 100644 (file)
@@ -1381,29 +1381,6 @@ static int vio_hotplug(struct device *dev, struct kobj_uevent_env *env)
        return 0;
 }
 
-static int vio_pm_suspend(struct device *dev)
-{
-       const struct dev_pm_ops *pm = dev->driver ? dev->driver->pm : NULL;
-
-       if (pm && pm->suspend)
-               return pm->suspend(dev);
-       return 0;
-}
-
-static int vio_pm_resume(struct device *dev)
-{
-       const struct dev_pm_ops *pm = dev->driver ? dev->driver->pm : NULL;
-
-       if (pm && pm->resume)
-               return pm->resume(dev);
-       return 0;
-}
-
-const struct dev_pm_ops vio_dev_pm_ops = {
-       .suspend = vio_pm_suspend,
-       .resume = vio_pm_resume,
-};
-
 static struct bus_type vio_bus_type = {
        .name = "vio",
        .dev_attrs = vio_dev_attrs,
@@ -1411,7 +1388,7 @@ static struct bus_type vio_bus_type = {
        .match = vio_bus_match,
        .probe = vio_bus_probe,
        .remove = vio_bus_remove,
-       .pm = &vio_dev_pm_ops,
+       .pm = GENERIC_SUBSYS_PM_OPS,
 };
 
 /**