[PATCHv3 2/3] powerpc: Switch VIO Bus PM to use generic helpers

Brian King brking at linux.vnet.ibm.com
Sat May 15 08:04:41 EST 2010


Switch to use the generic power management helpers.

Signed-off-by: Brian King <brking at linux.vnet.ibm.com>
---

 arch/powerpc/kernel/vio.c |   25 +------------------------
 1 file changed, 1 insertion(+), 24 deletions(-)

diff -puN arch/powerpc/kernel/vio.c~powerpc_vio_bus_pm2 arch/powerpc/kernel/vio.c
--- powerpc.git/arch/powerpc/kernel/vio.c~powerpc_vio_bus_pm2	2010-05-11 09:49:58.000000000 -0500
+++ powerpc.git-bjking1/arch/powerpc/kernel/vio.c	2010-05-11 09:50:44.000000000 -0500
@@ -1381,29 +1381,6 @@ static int vio_hotplug(struct device *de
 	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,
 };
 
 /**
_


More information about the Linuxppc-dev mailing list