* [PATCH] pcspkr: switch driver to dev_pm_ops
@ 2009-07-08 12:18 Frans Pop
2009-07-09 6:02 ` Dmitry Torokhov
0 siblings, 1 reply; 2+ messages in thread
From: Frans Pop @ 2009-07-08 12:18 UTC (permalink / raw)
To: linux-input; +Cc: Linux Kernel Mailing List, Rafael J. Wysocki, Dmitry Torokhov
Gets rid of the following warning:
Platform driver 'pcspkr' needs updating - please use dev_pm_ops
Signed-off-by: Frans Pop <elendil@planet.nl>
Cc: Rafael J. Wysocki <rjw@sisk.pl>
---
Looked straightforward enough for me to give it a shot.
diff --git a/drivers/input/misc/pcspkr.c b/drivers/input/misc/pcspkr.c
index 6d67af5..21cb755 100644
--- a/drivers/input/misc/pcspkr.c
+++ b/drivers/input/misc/pcspkr.c
@@ -114,7 +114,7 @@ static int __devexit pcspkr_remove(struct platform_device *dev)
return 0;
}
-static int pcspkr_suspend(struct platform_device *dev, pm_message_t state)
+static int pcspkr_suspend(struct device *dev)
{
pcspkr_event(NULL, EV_SND, SND_BELL, 0);
@@ -127,14 +127,18 @@ static void pcspkr_shutdown(struct platform_device *dev)
pcspkr_event(NULL, EV_SND, SND_BELL, 0);
}
+static struct dev_pm_ops pcspkr_pm_ops = {
+ .suspend = pcspkr_suspend,
+};
+
static struct platform_driver pcspkr_platform_driver = {
.driver = {
.name = "pcspkr",
.owner = THIS_MODULE,
+ .pm = &pcspkr_pm_ops,
},
.probe = pcspkr_probe,
.remove = __devexit_p(pcspkr_remove),
- .suspend = pcspkr_suspend,
.shutdown = pcspkr_shutdown,
};
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] pcspkr: switch driver to dev_pm_ops
2009-07-08 12:18 [PATCH] pcspkr: switch driver to dev_pm_ops Frans Pop
@ 2009-07-09 6:02 ` Dmitry Torokhov
0 siblings, 0 replies; 2+ messages in thread
From: Dmitry Torokhov @ 2009-07-09 6:02 UTC (permalink / raw)
To: Frans Pop; +Cc: linux-input, Linux Kernel Mailing List, Rafael J. Wysocki
On Wed, Jul 08, 2009 at 02:18:36PM +0200, Frans Pop wrote:
> Gets rid of the following warning:
> Platform driver 'pcspkr' needs updating - please use dev_pm_ops
>
> Signed-off-by: Frans Pop <elendil@planet.nl>
> Cc: Rafael J. Wysocki <rjw@sisk.pl>
Applied, thanks Frans.
--
Dmitry
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2009-07-09 6:03 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-07-08 12:18 [PATCH] pcspkr: switch driver to dev_pm_ops Frans Pop
2009-07-09 6:02 ` Dmitry Torokhov
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).