linux-ide.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] ata: pata_imx: Use the SIMPLE_DEV_PM_OPS() macro
@ 2014-10-04 12:03 Fabio Estevam
  2014-10-05  2:11 ` Tejun Heo
  0 siblings, 1 reply; 3+ messages in thread
From: Fabio Estevam @ 2014-10-04 12:03 UTC (permalink / raw)
  To: tj; +Cc: linux-ide, Fabio Estevam

From: Fabio Estevam <fabio.estevam@freescale.com>

Using the SIMPLE_DEV_PM_OPS() macro can make the code shorter and cleaner.

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
---
 drivers/ata/pata_imx.c | 9 ++-------
 1 file changed, 2 insertions(+), 7 deletions(-)

diff --git a/drivers/ata/pata_imx.c b/drivers/ata/pata_imx.c
index af42457..989ff5a 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)
 
 	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
 	},
 };
 
-- 
1.9.1


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] ata: pata_imx: Use the SIMPLE_DEV_PM_OPS() macro
  2014-10-04 12:03 [PATCH] ata: pata_imx: Use the SIMPLE_DEV_PM_OPS() macro Fabio Estevam
@ 2014-10-05  2:11 ` Tejun Heo
  2014-10-05 11:32   ` Fabio Estevam
  0 siblings, 1 reply; 3+ messages in thread
From: Tejun Heo @ 2014-10-05  2:11 UTC (permalink / raw)
  To: Fabio Estevam; +Cc: linux-ide, Fabio Estevam

On Sat, Oct 04, 2014 at 09:03:06AM -0300, Fabio Estevam wrote:
> From: Fabio Estevam <fabio.estevam@freescale.com>
> 
> Using the SIMPLE_DEV_PM_OPS() macro can make the code shorter and cleaner.
> 
> Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>

Applied to libata/for-3.18.  Care to convert other drivers too?

Thanks.

-- 
tejun

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] ata: pata_imx: Use the SIMPLE_DEV_PM_OPS() macro
  2014-10-05  2:11 ` Tejun Heo
@ 2014-10-05 11:32   ` Fabio Estevam
  0 siblings, 0 replies; 3+ messages in thread
From: Fabio Estevam @ 2014-10-05 11:32 UTC (permalink / raw)
  To: Tejun Heo; +Cc: linux-ide, Fabio Estevam

On Sat, Oct 4, 2014 at 11:11 PM, Tejun Heo <tj@kernel.org> wrote:
> On Sat, Oct 04, 2014 at 09:03:06AM -0300, Fabio Estevam wrote:
>> From: Fabio Estevam <fabio.estevam@freescale.com>
>>
>> Using the SIMPLE_DEV_PM_OPS() macro can make the code shorter and cleaner.
>>
>> Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
>
> Applied to libata/for-3.18.  Care to convert other drivers too?

Yes, I can submit patches for other drivers too. Thanks

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2014-10-05 11:32 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-10-04 12:03 [PATCH] ata: pata_imx: Use the SIMPLE_DEV_PM_OPS() macro Fabio Estevam
2014-10-05  2:11 ` Tejun Heo
2014-10-05 11:32   ` Fabio Estevam

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).