aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/ata/pata_imx.c
diff options
context:
space:
mode:
authorFabio Estevam <fabio.estevam@freescale.com>2014-10-04 08:03:06 -0400
committerTejun Heo <tj@kernel.org>2014-10-04 22:06:57 -0400
commit36888e955c7c7ba8c66756fed60ac6e453fcbb5f (patch)
treec223f2d1ed7415df2f852cae5dd057db1ac5581b /drivers/ata/pata_imx.c
parentc3ebd6a9b614ef1fbb5a44a3a33cd639ff4694bf (diff)
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: Fabio Estevam <fabio.estevam@freescale.com> Signed-off-by: Tejun Heo <tj@kernel.org>
Diffstat (limited to 'drivers/ata/pata_imx.c')
-rw-r--r--drivers/ata/pata_imx.c9
1 files changed, 2 insertions, 7 deletions
diff --git a/drivers/ata/pata_imx.c b/drivers/ata/pata_imx.c
index af424573c2ff..989ff5ac69ec 100644
--- a/drivers/ata/pata_imx.c
+++ b/drivers/ata/pata_imx.c
@@ -221,13 +221,10 @@ static int pata_imx_resume(struct device *dev)
221 221
222 return 0; 222 return 0;
223} 223}
224
225static const struct dev_pm_ops pata_imx_pm_ops = {
226 .suspend = pata_imx_suspend,
227 .resume = pata_imx_resume,
228};
229#endif 224#endif
230 225
226static SIMPLE_DEV_PM_OPS(pata_imx_pm_ops, pata_imx_suspend, pata_imx_resume);
227
231static const struct of_device_id imx_pata_dt_ids[] = { 228static const struct of_device_id imx_pata_dt_ids[] = {
232 { 229 {
233 .compatible = "fsl,imx27-pata", 230 .compatible = "fsl,imx27-pata",
@@ -244,9 +241,7 @@ static struct platform_driver pata_imx_driver = {
244 .name = DRV_NAME, 241 .name = DRV_NAME,
245 .of_match_table = imx_pata_dt_ids, 242 .of_match_table = imx_pata_dt_ids,
246 .owner = THIS_MODULE, 243 .owner = THIS_MODULE,
247#ifdef CONFIG_PM_SLEEP
248 .pm = &pata_imx_pm_ops, 244 .pm = &pata_imx_pm_ops,
249#endif
250 }, 245 },
251}; 246};
252 247