]> git.karo-electronics.de Git - linux-beck.git/commitdiff
usb: musb: blackfin: use SIMPLE_DEV_PM_OPS
authorDaniel Mack <zonque@gmail.com>
Mon, 30 Sep 2013 19:02:08 +0000 (21:02 +0200)
committerFelipe Balbi <balbi@ti.com>
Wed, 2 Oct 2013 13:21:55 +0000 (08:21 -0500)
This makes bfin_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/blackfin.c

index 72e2056b6082f4c4872b9a7d94c82f59193e00f4..d9692f78e227ead7e79b28becdafda6c275161d8 100644 (file)
@@ -561,23 +561,16 @@ static int bfin_resume(struct device *dev)
 
        return 0;
 }
-
-static struct dev_pm_ops bfin_pm_ops = {
-       .suspend        = bfin_suspend,
-       .resume         = bfin_resume,
-};
-
-#define DEV_PM_OPS     &bfin_pm_ops
-#else
-#define DEV_PM_OPS     NULL
 #endif
 
+static SIMPLE_DEV_PM_OPS(bfin_pm_ops, bfin_suspend, bfin_resume);
+
 static struct platform_driver bfin_driver = {
        .probe          = bfin_probe,
        .remove         = __exit_p(bfin_remove),
        .driver         = {
                .name   = "musb-blackfin",
-               .pm     = DEV_PM_OPS,
+               .pm     = &bfin_pm_ops,
        },
 };