public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/1] acer-wmi: switch driver to dev_pm_ops
@ 2009-07-25 13:04 Arnaud Faucher
  2009-07-25 17:43 ` Dmitry Torokhov
  0 siblings, 1 reply; 18+ messages in thread
From: Arnaud Faucher @ 2009-07-25 13:04 UTC (permalink / raw)
  To: linux-kernel; +Cc: Arnaud Faucher, Carlos Corbacho

Gets rid of the following warning:
Platform driver 'acer-wmi' needs updating - please use dev_pm_ops

Signed-off-by: Arnaud Faucher <arnaud.faucher@gmail.com>
---
 drivers/platform/x86/acer-wmi.c |   13 ++++++++-----
 1 files changed, 8 insertions(+), 5 deletions(-)

diff --git a/drivers/platform/x86/acer-wmi.c b/drivers/platform/x86/acer-wmi.c
index be2fd6f..b2b6aef 100644
--- a/drivers/platform/x86/acer-wmi.c
+++ b/drivers/platform/x86/acer-wmi.c
@@ -1152,8 +1152,7 @@ static int acer_platform_remove(struct platform_device *device)
 	return 0;
 }
 
-static int acer_platform_suspend(struct platform_device *dev,
-pm_message_t state)
+static int acer_platform_suspend(struct device *dev)
 {
 	u32 value;
 	struct acer_data *data = &interface->data;
@@ -1174,7 +1173,7 @@ pm_message_t state)
 	return 0;
 }
 
-static int acer_platform_resume(struct platform_device *device)
+static int acer_platform_resume(struct device *dev)
 {
 	struct acer_data *data = &interface->data;
 
@@ -1190,15 +1189,19 @@ static int acer_platform_resume(struct platform_device *device)
 	return 0;
 }
 
+static struct dev_pm_ops acer_platform_pm_ops = {
+	.suspend = acer_platform_suspend,
+	.resume = acer_platform_resume,
+};
+
 static struct platform_driver acer_platform_driver = {
 	.driver = {
 		.name = "acer-wmi",
 		.owner = THIS_MODULE,
+		.pm = &acer_platform_pm_ops,
 	},
 	.probe = acer_platform_probe,
 	.remove = acer_platform_remove,
-	.suspend = acer_platform_suspend,
-	.resume = acer_platform_resume,
 };
 
 static struct platform_device *acer_platform_device;
-- 
1.6.3.3


^ permalink raw reply related	[flat|nested] 18+ messages in thread

end of thread, other threads:[~2009-07-31 11:56 UTC | newest]

Thread overview: 18+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-07-25 13:04 [PATCH 1/1] acer-wmi: switch driver to dev_pm_ops Arnaud Faucher
2009-07-25 17:43 ` Dmitry Torokhov
2009-07-25 20:04   ` Rafael J. Wysocki
2009-07-26 13:53     ` Arnaud Faucher
2009-07-26 14:23       ` Carlos Corbacho
2009-07-26 18:08         ` Dmitry Torokhov
2009-07-26 18:35           ` Carlos Corbacho
2009-07-26 20:28             ` Arnaud Faucher
2009-07-26 21:33               ` Dmitry Torokhov
2009-07-26 22:51                 ` Arnaud Faucher
2009-07-28 23:39                   ` Arnaud Faucher
2009-07-29 20:49                     ` Rafael J. Wysocki
2009-07-29 21:03                       ` Dmitry Torokhov
2009-07-29 22:53                         ` Arnaud Faucher
2009-07-30 22:05                           ` Arnaud Faucher
2009-07-31 11:56                             ` Rafael J. Wysocki
2009-07-29 23:27                         ` Rafael J. Wysocki
2009-07-25 20:10   ` Arnaud Faucher

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox