summaryrefslogtreecommitdiffstats
path: root/drivers/platform
diff options
context:
space:
mode:
authorRafael J. Wysocki <rjw@sisk.pl>2012-06-27 23:19:01 +0200
committerRafael J. Wysocki <rjw@sisk.pl>2012-07-01 13:31:13 +0200
commit4959a781bc1bbd0d06092caa94e33fd41033a38d (patch)
tree04dccf6f7bb908ae27bb0d89be7e16026e2f9b7d /drivers/platform
parentfd3c3a424e43e4f85385de0c2609c490605611a6 (diff)
downloadop-kernel-dev-4959a781bc1bbd0d06092caa94e33fd41033a38d.zip
op-kernel-dev-4959a781bc1bbd0d06092caa94e33fd41033a38d.tar.gz
thinkpad_acpi: Use struct dev_pm_ops instead of legacy PM routines
Make the thinkpad_acpi driver define its PM callbacks through a struct dev_pm_ops object rather than by using legacy PM hooks in struct platform_driver. Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl> Acked-by: Henrique de Moraes Holschuh <hmh@hmh.eng.br> Acked-by: Matthew Garrett <mjg@redhat.com>
Diffstat (limited to 'drivers/platform')
-rw-r--r--drivers/platform/x86/thinkpad_acpi.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/drivers/platform/x86/thinkpad_acpi.c b/drivers/platform/x86/thinkpad_acpi.c
index 070e555..d5fd4a1 100644
--- a/drivers/platform/x86/thinkpad_acpi.c
+++ b/drivers/platform/x86/thinkpad_acpi.c
@@ -922,8 +922,7 @@ static struct input_dev *tpacpi_inputdev;
static struct mutex tpacpi_inputdev_send_mutex;
static LIST_HEAD(tpacpi_all_drivers);
-static int tpacpi_suspend_handler(struct platform_device *pdev,
- pm_message_t state)
+static int tpacpi_suspend_handler(struct device *dev)
{
struct ibm_struct *ibm, *itmp;
@@ -937,7 +936,7 @@ static int tpacpi_suspend_handler(struct platform_device *pdev,
return 0;
}
-static int tpacpi_resume_handler(struct platform_device *pdev)
+static int tpacpi_resume_handler(struct device *dev)
{
struct ibm_struct *ibm, *itmp;
@@ -951,6 +950,9 @@ static int tpacpi_resume_handler(struct platform_device *pdev)
return 0;
}
+static SIMPLE_DEV_PM_OPS(tpacpi_pm,
+ tpacpi_suspend_handler, tpacpi_resume_handler);
+
static void tpacpi_shutdown_handler(struct platform_device *pdev)
{
struct ibm_struct *ibm, *itmp;
@@ -967,9 +969,8 @@ static struct platform_driver tpacpi_pdriver = {
.driver = {
.name = TPACPI_DRVR_NAME,
.owner = THIS_MODULE,
+ .pm = &tpacpi_pm,
},
- .suspend = tpacpi_suspend_handler,
- .resume = tpacpi_resume_handler,
.shutdown = tpacpi_shutdown_handler,
};
OpenPOWER on IntegriCloud