ata: pata_imx: Use the SIMPLE_DEV_PM_OPS() macro
authorFabio Estevam <fabio.estevam@freescale.com>
Sat, 4 Oct 2014 12:03:06 +0000 (09:03 -0300)
committerTejun Heo <tj@kernel.org>
Sun, 5 Oct 2014 02:06:57 +0000 (22:06 -0400)
Using the SIMPLE_DEV_PM_OPS() macro can make the code shorter and cleaner.

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
Signed-off-by: Tejun Heo <tj@kernel.org>
drivers/ata/pata_imx.c

index af424573c2ff1700777415f1c95c1b43582d2a2b..989ff5ac69ecc8a583271003518037d121e561d1 100644 (file)
@@ -221,13 +221,10 @@ static int pata_imx_resume(struct device *dev)
 
        return 0;
 }
-
-static const struct dev_pm_ops pata_imx_pm_ops = {
-       .suspend        = pata_imx_suspend,
-       .resume         = pata_imx_resume,
-};
 #endif
 
+static SIMPLE_DEV_PM_OPS(pata_imx_pm_ops, pata_imx_suspend, pata_imx_resume);
+
 static const struct of_device_id imx_pata_dt_ids[] = {
        {
                .compatible = "fsl,imx27-pata",
@@ -244,9 +241,7 @@ static struct platform_driver pata_imx_driver = {
                .name           = DRV_NAME,
                .of_match_table = imx_pata_dt_ids,
                .owner          = THIS_MODULE,
-#ifdef CONFIG_PM_SLEEP
                .pm             = &pata_imx_pm_ops,
-#endif
        },
 };
 
This page took 0.09599 seconds and 5 git commands to generate.