usb: phy: am335x: Use SIMPLE_DEV_PM_OPS macro
authorJingoo Han <jg1.han@samsung.com>
Tue, 8 Jul 2014 11:51:34 +0000 (20:51 +0900)
committerFelipe Balbi <balbi@ti.com>
Thu, 10 Jul 2014 13:39:20 +0000 (08:39 -0500)
Use SIMPLE_DEV_PM_OPS macro and remove DEV_PM_OPS macro, in order
to make the code simpler.

Acked-by: Roger Quadros <rogerq@ti.com>
Signed-off-by: Jingoo Han <jg1.han@samsung.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
drivers/usb/phy/phy-am335x.c

index 585e50cb19801485bd4df4af17a0b615ed11d80d..b70e05537180b25daa0c060a6975baac69e20024 100644 (file)
@@ -122,16 +122,10 @@ static int am335x_phy_resume(struct device *dev)
 
        return 0;
 }
-
-static const struct dev_pm_ops am335x_pm_ops = {
-       SET_SYSTEM_SLEEP_PM_OPS(am335x_phy_suspend, am335x_phy_resume)
-};
-
-#define DEV_PM_OPS     (&am335x_pm_ops)
-#else
-#define DEV_PM_OPS     NULL
 #endif
 
+static SIMPLE_DEV_PM_OPS(am335x_pm_ops, am335x_phy_suspend, am335x_phy_resume);
+
 static const struct of_device_id am335x_phy_ids[] = {
        { .compatible = "ti,am335x-usb-phy" },
        { }
@@ -144,7 +138,7 @@ static struct platform_driver am335x_phy_driver = {
        .driver         = {
                .name   = "am335x-phy-driver",
                .owner  = THIS_MODULE,
-               .pm = DEV_PM_OPS,
+               .pm = &am335x_pm_ops,
                .of_match_table = am335x_phy_ids,
        },
 };