Skip to content

Commit

Permalink
ata: pata_imx: Use the SIMPLE_DEV_PM_OPS() macro
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Fabio Estevam authored and Tejun Heo committed Oct 5, 2014
1 parent c3ebd6a commit 36888e9
Showing 1 changed file with 2 additions and 7 deletions.
9 changes: 2 additions & 7 deletions drivers/ata/pata_imx.c
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand All @@ -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
},
};

Expand Down

0 comments on commit 36888e9

Please sign in to comment.