diff options
author | Brian King <brking@linux.vnet.ibm.com> | 2010-05-14 08:04:41 -0400 |
---|---|---|
committer | Benjamin Herrenschmidt <benh@kernel.crashing.org> | 2010-05-21 03:31:09 -0400 |
commit | a1263c71448aa70afb6097fdedf93c3dff5a7a15 (patch) | |
tree | 241a4f88e7a09a769c29ff62f99b4ee9cff7a025 | |
parent | e62cee42e66dcca83aae02748535f62e0f564a0c (diff) |
powerpc/vio: Switch VIO Bus PM to use generic helpers
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>
-rw-r--r-- | arch/powerpc/kernel/vio.c | 25 |
1 files changed, 1 insertions, 24 deletions
diff --git a/arch/powerpc/kernel/vio.c b/arch/powerpc/kernel/vio.c index b8e311d64ad5..9ce7b62dc3a4 100644 --- a/arch/powerpc/kernel/vio.c +++ b/arch/powerpc/kernel/vio.c | |||
@@ -1381,29 +1381,6 @@ static int vio_hotplug(struct device *dev, struct kobj_uevent_env *env) | |||
1381 | return 0; | 1381 | return 0; |
1382 | } | 1382 | } |
1383 | 1383 | ||
1384 | static int vio_pm_suspend(struct device *dev) | ||
1385 | { | ||
1386 | const struct dev_pm_ops *pm = dev->driver ? dev->driver->pm : NULL; | ||
1387 | |||
1388 | if (pm && pm->suspend) | ||
1389 | return pm->suspend(dev); | ||
1390 | return 0; | ||
1391 | } | ||
1392 | |||
1393 | static int vio_pm_resume(struct device *dev) | ||
1394 | { | ||
1395 | const struct dev_pm_ops *pm = dev->driver ? dev->driver->pm : NULL; | ||
1396 | |||
1397 | if (pm && pm->resume) | ||
1398 | return pm->resume(dev); | ||
1399 | return 0; | ||
1400 | } | ||
1401 | |||
1402 | const struct dev_pm_ops vio_dev_pm_ops = { | ||
1403 | .suspend = vio_pm_suspend, | ||
1404 | .resume = vio_pm_resume, | ||
1405 | }; | ||
1406 | |||
1407 | static struct bus_type vio_bus_type = { | 1384 | static struct bus_type vio_bus_type = { |
1408 | .name = "vio", | 1385 | .name = "vio", |
1409 | .dev_attrs = vio_dev_attrs, | 1386 | .dev_attrs = vio_dev_attrs, |
@@ -1411,7 +1388,7 @@ static struct bus_type vio_bus_type = { | |||
1411 | .match = vio_bus_match, | 1388 | .match = vio_bus_match, |
1412 | .probe = vio_bus_probe, | 1389 | .probe = vio_bus_probe, |
1413 | .remove = vio_bus_remove, | 1390 | .remove = vio_bus_remove, |
1414 | .pm = &vio_dev_pm_ops, | 1391 | .pm = GENERIC_SUBSYS_PM_OPS, |
1415 | }; | 1392 | }; |
1416 | 1393 | ||
1417 | /** | 1394 | /** |