diff options
author | Sergei Shtylyov <sergei.shtylyov@cogentembedded.com> | 2015-01-20 16:09:46 -0500 |
---|---|---|
committer | Vinod Koul <vinod.koul@intel.com> | 2015-02-12 02:22:17 -0500 |
commit | 82bf90c62834842249c4f94535079f5cbec9014c (patch) | |
tree | 7f7974c660928ba1d485bfe84059dd07ced278be | |
parent | 0091b9d6c1ef2caab6cb3b6c0aa75f9948307856 (diff) |
dmaengine: shdmac: use SET_RUNTIME_PM_OPS()
Use SET_RUNTIME_PM_OPS() to initialize the runtime PM method pointers in the
'struct dev_pm_ops'; since that macro doesn't do anything if CONFIG_PM is
not defined, we have to move #ifdef up to also cover the runtime PM methods
in order to avoid compilation warnings.
Based on orignal patch by Mikhail Ulyanov <mikhail.ulyanov@cogentembedded.com>.
Signed-off-by: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
Signed-off-by: Vinod Koul <vinod.koul@intel.com>
-rw-r--r-- | drivers/dma/sh/shdmac.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/dma/sh/shdmac.c b/drivers/dma/sh/shdmac.c index ce4cd6be07cf..023344f7f78e 100644 --- a/drivers/dma/sh/shdmac.c +++ b/drivers/dma/sh/shdmac.c | |||
@@ -588,6 +588,7 @@ static void sh_dmae_shutdown(struct platform_device *pdev) | |||
588 | sh_dmae_ctl_stop(shdev); | 588 | sh_dmae_ctl_stop(shdev); |
589 | } | 589 | } |
590 | 590 | ||
591 | #ifdef CONFIG_PM | ||
591 | static int sh_dmae_runtime_suspend(struct device *dev) | 592 | static int sh_dmae_runtime_suspend(struct device *dev) |
592 | { | 593 | { |
593 | return 0; | 594 | return 0; |
@@ -600,7 +601,6 @@ static int sh_dmae_runtime_resume(struct device *dev) | |||
600 | return sh_dmae_rst(shdev); | 601 | return sh_dmae_rst(shdev); |
601 | } | 602 | } |
602 | 603 | ||
603 | #ifdef CONFIG_PM | ||
604 | static int sh_dmae_suspend(struct device *dev) | 604 | static int sh_dmae_suspend(struct device *dev) |
605 | { | 605 | { |
606 | return 0; | 606 | return 0; |
@@ -640,8 +640,8 @@ static int sh_dmae_resume(struct device *dev) | |||
640 | static const struct dev_pm_ops sh_dmae_pm = { | 640 | static const struct dev_pm_ops sh_dmae_pm = { |
641 | .suspend = sh_dmae_suspend, | 641 | .suspend = sh_dmae_suspend, |
642 | .resume = sh_dmae_resume, | 642 | .resume = sh_dmae_resume, |
643 | .runtime_suspend = sh_dmae_runtime_suspend, | 643 | SET_RUNTIME_PM_OPS(sh_dmae_runtime_suspend, sh_dmae_runtime_resume, |
644 | .runtime_resume = sh_dmae_runtime_resume, | 644 | NULL) |
645 | }; | 645 | }; |
646 | 646 | ||
647 | static dma_addr_t sh_dmae_slave_addr(struct shdma_chan *schan) | 647 | static dma_addr_t sh_dmae_slave_addr(struct shdma_chan *schan) |