usb: musb: am35x: use SIMPLE_DEV_PM_OPS
authorDaniel Mack <zonque@gmail.com>
Mon, 30 Sep 2013 19:02:07 +0000 (21:02 +0200)
committerFelipe Balbi <balbi@ti.com>
Wed, 2 Oct 2013 13:21:23 +0000 (08:21 -0500)
This makes am35x_pm_ops const and will stub the struct out in case
CONFIG_PM_SLEEP is not set.

Signed-off-by: Daniel Mack <zonque@gmail.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
drivers/usb/musb/am35x.c

index 790b22b296b11f527b2060a76e6aa89624d8d804..ca45b39db5b91b62d36e61089916ce3910f7af89 100644 (file)
@@ -599,23 +599,16 @@ static int am35x_resume(struct device *dev)
 
        return 0;
 }
-
-static struct dev_pm_ops am35x_pm_ops = {
-       .suspend        = am35x_suspend,
-       .resume         = am35x_resume,
-};
-
-#define DEV_PM_OPS     &am35x_pm_ops
-#else
-#define DEV_PM_OPS     NULL
 #endif
 
+static SIMPLE_DEV_PM_OPS(am35x_pm_ops, am35x_suspend, am35x_resume);
+
 static struct platform_driver am35x_driver = {
        .probe          = am35x_probe,
        .remove         = am35x_remove,
        .driver         = {
                .name   = "musb-am35x",
-               .pm     = DEV_PM_OPS,
+               .pm     = &am35x_pm_ops,
        },
 };
 
This page took 0.040149 seconds and 5 git commands to generate.