Commit 36888e95 authored by Fabio Estevam's avatar Fabio Estevam Committed by Tejun Heo

ata: pata_imx: Use the SIMPLE_DEV_PM_OPS() macro

Using the SIMPLE_DEV_PM_OPS() macro can make the code shorter and cleaner.
Signed-off-by: default avatarFabio Estevam <fabio.estevam@freescale.com>
Signed-off-by: default avatarTejun Heo <tj@kernel.org>
parent c3ebd6a9
...@@ -221,13 +221,10 @@ static int pata_imx_resume(struct device *dev) ...@@ -221,13 +221,10 @@ static int pata_imx_resume(struct device *dev)
return 0; return 0;
} }
static const struct dev_pm_ops pata_imx_pm_ops = {
.suspend = pata_imx_suspend,
.resume = pata_imx_resume,
};
#endif #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[] = { static const struct of_device_id imx_pata_dt_ids[] = {
{ {
.compatible = "fsl,imx27-pata", .compatible = "fsl,imx27-pata",
...@@ -244,9 +241,7 @@ static struct platform_driver pata_imx_driver = { ...@@ -244,9 +241,7 @@ static struct platform_driver pata_imx_driver = {
.name = DRV_NAME, .name = DRV_NAME,
.of_match_table = imx_pata_dt_ids, .of_match_table = imx_pata_dt_ids,
.owner = THIS_MODULE, .owner = THIS_MODULE,
#ifdef CONFIG_PM_SLEEP
.pm = &pata_imx_pm_ops, .pm = &pata_imx_pm_ops,
#endif
}, },
}; };
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment