From: Brian King <brking@linux.vnet.ibm.com>
To: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: linuxppc-dev@lists.ozlabs.org
Subject: [PATCHv3 2/3] powerpc: Switch VIO Bus PM to use generic helpers
Date: Fri, 14 May 2010 17:04:41 -0500 [thread overview]
Message-ID: <4BEDC8F9.1010104@linux.vnet.ibm.com> (raw)
In-Reply-To: <1273556129.21352.3.camel@pasglop>
Switch to use the generic power management helpers.
Signed-off-by: Brian King <brking@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,
};
/**
_
prev parent reply other threads:[~2010-05-14 22:04 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-05-10 20:53 [PATCHv2 2/3] powerpc: Add power management support to VIO bus Brian King
2010-05-11 5:35 ` Benjamin Herrenschmidt
2010-05-14 22:04 ` Brian King [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4BEDC8F9.1010104@linux.vnet.ibm.com \
--to=brking@linux.vnet.ibm.com \
--cc=benh@kernel.crashing.org \
--cc=linuxppc-dev@lists.ozlabs.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).