* [PATCH v2 1/2] shdmac: use SET_RUNTIME_PM_OPS()
@ 2015-01-20 21:09 Sergei Shtylyov
2015-02-11 1:35 ` Vinod Koul
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: Sergei Shtylyov @ 2015-01-20 21:09 UTC (permalink / raw)
To: linux-sh
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>
---
The patch is against the 'next' branch of Vinod Koul's 'slave-dma.git' repo.
drivers/dma/sh/shdmac.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
Index: slave-dma/drivers/dma/sh/shdmac.c
=================================--- slave-dma.orig/drivers/dma/sh/shdmac.c
+++ slave-dma/drivers/dma/sh/shdmac.c
@@ -588,6 +588,7 @@ static void sh_dmae_shutdown(struct plat
sh_dmae_ctl_stop(shdev);
}
+#ifdef CONFIG_PM
static int sh_dmae_runtime_suspend(struct device *dev)
{
return 0;
@@ -600,7 +601,6 @@ static int sh_dmae_runtime_resume(struct
return sh_dmae_rst(shdev);
}
-#ifdef CONFIG_PM
static int sh_dmae_suspend(struct device *dev)
{
return 0;
@@ -640,8 +640,8 @@ static int sh_dmae_resume(struct device
static const struct dev_pm_ops sh_dmae_pm = {
.suspend = sh_dmae_suspend,
.resume = sh_dmae_resume,
- .runtime_suspend = sh_dmae_runtime_suspend,
- .runtime_resume = sh_dmae_runtime_resume,
+ SET_RUNTIME_PM_OPS(sh_dmae_runtime_suspend, sh_dmae_runtime_resume,
+ NULL)
};
static dma_addr_t sh_dmae_slave_addr(struct shdma_chan *schan)
^ permalink raw reply [flat|nested] 4+ messages in thread* Re: [PATCH v2 1/2] shdmac: use SET_RUNTIME_PM_OPS()
2015-01-20 21:09 [PATCH v2 1/2] shdmac: use SET_RUNTIME_PM_OPS() Sergei Shtylyov
@ 2015-02-11 1:35 ` Vinod Koul
2015-02-11 10:47 ` Sergei Shtylyov
2015-02-13 8:44 ` Vinod Koul
2 siblings, 0 replies; 4+ messages in thread
From: Vinod Koul @ 2015-02-11 1:35 UTC (permalink / raw)
To: linux-sh
On Wed, Jan 21, 2015 at 12:09:46AM +0300, Sergei Shtylyov wrote:
> 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.
>
Applied both, thanks.
Btw shdmac is NOT a subsystem name!!
--
~Vinod
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH v2 1/2] shdmac: use SET_RUNTIME_PM_OPS()
2015-01-20 21:09 [PATCH v2 1/2] shdmac: use SET_RUNTIME_PM_OPS() Sergei Shtylyov
2015-02-11 1:35 ` Vinod Koul
@ 2015-02-11 10:47 ` Sergei Shtylyov
2015-02-13 8:44 ` Vinod Koul
2 siblings, 0 replies; 4+ messages in thread
From: Sergei Shtylyov @ 2015-02-11 10:47 UTC (permalink / raw)
To: linux-sh
Hello.
On 2/11/2015 4:23 AM, Vinod Koul wrote:
>> 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.
> Applied both, thanks.
Thanks to you! Will they get into 3.20?
> Btw shdmac is NOT a subsystem name!!
Sorry, I usually don't add the subsystem names, leaving that to the
maintainers who want (or don't want) to do it.
WBR, Sergei
^ permalink raw reply [flat|nested] 4+ messages in thread* Re: [PATCH v2 1/2] shdmac: use SET_RUNTIME_PM_OPS()
2015-01-20 21:09 [PATCH v2 1/2] shdmac: use SET_RUNTIME_PM_OPS() Sergei Shtylyov
2015-02-11 1:35 ` Vinod Koul
2015-02-11 10:47 ` Sergei Shtylyov
@ 2015-02-13 8:44 ` Vinod Koul
2 siblings, 0 replies; 4+ messages in thread
From: Vinod Koul @ 2015-02-13 8:44 UTC (permalink / raw)
To: linux-sh
On Wed, Feb 11, 2015 at 01:47:31PM +0300, Sergei Shtylyov wrote:
> Hello.
>
> On 2/11/2015 4:23 AM, Vinod Koul wrote:
>
> >>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.
>
> >Applied both, thanks.
>
> Thanks to you! Will they get into 3.20?
Yes they are queued up
--
~Vinod
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2015-02-13 8:44 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-01-20 21:09 [PATCH v2 1/2] shdmac: use SET_RUNTIME_PM_OPS() Sergei Shtylyov
2015-02-11 1:35 ` Vinod Koul
2015-02-11 10:47 ` Sergei Shtylyov
2015-02-13 8:44 ` Vinod Koul
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).