Input: pcspkr - switch driver to dev_pm_ops
authorFrans Pop <elendil@planet.nl>
Mon, 13 Jul 2009 03:51:32 +0000 (20:51 -0700)
committerDmitry Torokhov <dmitry.torokhov@gmail.com>
Mon, 13 Jul 2009 05:16:12 +0000 (22:16 -0700)
Gets rid of the following warning:
Platform driver 'pcspkr' needs updating - please use dev_pm_ops

Signed-off-by: Frans Pop <elendil@planet.nl>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
drivers/input/misc/pcspkr.c

index d6a30cee7bc79b63f5ed124d48dc36ac55bd9e05..663bbc7ae2f5faeda61889448dbc5ee1c97ab8a1 100644 (file)
@@ -113,7 +113,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);
 
@@ -126,14 +126,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,
 };