* [PATCH] [media] s5p-jpeg: Only build suspend/resume for PM
@ 2014-10-02 7:21 Thierry Reding
2014-10-13 16:16 ` Geert Uytterhoeven
0 siblings, 1 reply; 4+ messages in thread
From: Thierry Reding @ 2014-10-02 7:21 UTC (permalink / raw)
To: Mauro Carvalho Chehab; +Cc: linux-media, linux-kernel
From: Thierry Reding <treding@nvidia.com>
If power management is disabled these function become unused, so there
is no reason to build them. This fixes a couple of build warnings when
PM(_SLEEP,_RUNTIME) is not enabled.
Signed-off-by: Thierry Reding <treding@nvidia.com>
---
drivers/media/platform/s5p-jpeg/jpeg-core.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/drivers/media/platform/s5p-jpeg/jpeg-core.c b/drivers/media/platform/s5p-jpeg/jpeg-core.c
index e525a7c8d885..cc5d6bd40256 100644
--- a/drivers/media/platform/s5p-jpeg/jpeg-core.c
+++ b/drivers/media/platform/s5p-jpeg/jpeg-core.c
@@ -2632,6 +2632,7 @@ static int s5p_jpeg_remove(struct platform_device *pdev)
return 0;
}
+#if defined(CONFIG_PM_RUNTIME) || defined(CONFIG_PM_SLEEP)
static int s5p_jpeg_runtime_suspend(struct device *dev)
{
struct s5p_jpeg *jpeg = dev_get_drvdata(dev);
@@ -2681,7 +2682,9 @@ static int s5p_jpeg_runtime_resume(struct device *dev)
return 0;
}
+#endif
+#ifdef CONFIG_PM_SLEEP
static int s5p_jpeg_suspend(struct device *dev)
{
if (pm_runtime_suspended(dev))
@@ -2697,6 +2700,7 @@ static int s5p_jpeg_resume(struct device *dev)
return s5p_jpeg_runtime_resume(dev);
}
+#endif
static const struct dev_pm_ops s5p_jpeg_pm_ops = {
SET_SYSTEM_SLEEP_PM_OPS(s5p_jpeg_suspend, s5p_jpeg_resume)
--
2.1.0
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] [media] s5p-jpeg: Only build suspend/resume for PM
2014-10-02 7:21 [PATCH] [media] s5p-jpeg: Only build suspend/resume for PM Thierry Reding
@ 2014-10-13 16:16 ` Geert Uytterhoeven
2014-10-13 16:24 ` Mauro Carvalho Chehab
0 siblings, 1 reply; 4+ messages in thread
From: Geert Uytterhoeven @ 2014-10-13 16:16 UTC (permalink / raw)
To: Thierry Reding
Cc: Mauro Carvalho Chehab, Linux Media Mailing List, linux-kernel
On Thu, Oct 2, 2014 at 9:21 AM, Thierry Reding <thierry.reding@gmail.com> wrote:
> From: Thierry Reding <treding@nvidia.com>
>
> If power management is disabled these function become unused, so there
> is no reason to build them. This fixes a couple of build warnings when
> PM(_SLEEP,_RUNTIME) is not enabled.
Thanks!
Despite the availability of your patch, this build warning has
migrated to mainline.
> Signed-off-by: Thierry Reding <treding@nvidia.com>
Acked-by: Geert Uytterhoeven <geert@linux-m68k.org>
> --- a/drivers/media/platform/s5p-jpeg/jpeg-core.c
> +++ b/drivers/media/platform/s5p-jpeg/jpeg-core.c
> @@ -2681,7 +2682,9 @@ static int s5p_jpeg_runtime_resume(struct device *dev)
>
> return 0;
> }
> +#endif
I'd add a comment "/* CONFIG_PM_RUNTIME || CONFIG_PM_SLEEP */" here,
as above is a big block of code.
Gr{oetje,eeting}s,
Geert
--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org
In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] [media] s5p-jpeg: Only build suspend/resume for PM
2014-10-13 16:16 ` Geert Uytterhoeven
@ 2014-10-13 16:24 ` Mauro Carvalho Chehab
2014-10-13 19:53 ` Geert Uytterhoeven
0 siblings, 1 reply; 4+ messages in thread
From: Mauro Carvalho Chehab @ 2014-10-13 16:24 UTC (permalink / raw)
To: Geert Uytterhoeven; +Cc: Thierry Reding, Linux Media Mailing List, linux-kernel
Em Mon, 13 Oct 2014 18:16:10 +0200
Geert Uytterhoeven <geert@linux-m68k.org> escreveu:
> On Thu, Oct 2, 2014 at 9:21 AM, Thierry Reding <thierry.reding@gmail.com> wrote:
> > From: Thierry Reding <treding@nvidia.com>
> >
> > If power management is disabled these function become unused, so there
> > is no reason to build them. This fixes a couple of build warnings when
> > PM(_SLEEP,_RUNTIME) is not enabled.
>
> Thanks!
>
> Despite the availability of your patch, this build warning has
> migrated to mainline.
That's because I didn't have any time yet to backport the fixes for
3.18 and send those to -next. Also, while warnings are annoying,
a warning like that is not really an urgent matter, as gcc should
remove the dead code anyway.
I should be handling fixes next week, after my return from LinuxCon EU,
gstreamer conf, audio mini-summit and media summit. This will be a too
busy week.
> > Signed-off-by: Thierry Reding <treding@nvidia.com>
>
> Acked-by: Geert Uytterhoeven <geert@linux-m68k.org>
>
> > --- a/drivers/media/platform/s5p-jpeg/jpeg-core.c
> > +++ b/drivers/media/platform/s5p-jpeg/jpeg-core.c
>
> > @@ -2681,7 +2682,9 @@ static int s5p_jpeg_runtime_resume(struct device *dev)
> >
> > return 0;
> > }
> > +#endif
>
> I'd add a comment "/* CONFIG_PM_RUNTIME || CONFIG_PM_SLEEP */" here,
> as above is a big block of code.
>
> Gr{oetje,eeting}s,
>
> Geert
>
> --
> Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org
>
> In personal conversations with technical people, I call myself a hacker. But
> when I'm talking to journalists I just say "programmer" or something like that.
> -- Linus Torvalds
--
Cheers,
Mauro
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] [media] s5p-jpeg: Only build suspend/resume for PM
2014-10-13 16:24 ` Mauro Carvalho Chehab
@ 2014-10-13 19:53 ` Geert Uytterhoeven
0 siblings, 0 replies; 4+ messages in thread
From: Geert Uytterhoeven @ 2014-10-13 19:53 UTC (permalink / raw)
To: Mauro Carvalho Chehab
Cc: Thierry Reding, Linux Media Mailing List, linux-kernel
Hi Mauro,
On Mon, Oct 13, 2014 at 6:24 PM, Mauro Carvalho Chehab
<m.chehab@samsung.com> wrote:
> Em Mon, 13 Oct 2014 18:16:10 +0200
> Geert Uytterhoeven <geert@linux-m68k.org> escreveu:
>> On Thu, Oct 2, 2014 at 9:21 AM, Thierry Reding <thierry.reding@gmail.com> wrote:
>> > From: Thierry Reding <treding@nvidia.com>
>> >
>> > If power management is disabled these function become unused, so there
>> > is no reason to build them. This fixes a couple of build warnings when
>> > PM(_SLEEP,_RUNTIME) is not enabled.
>>
>> Thanks!
>>
>> Despite the availability of your patch, this build warning has
>> migrated to mainline.
>
> That's because I didn't have any time yet to backport the fixes for
> 3.18 and send those to -next. Also, while warnings are annoying,
> a warning like that is not really an urgent matter, as gcc should
> remove the dead code anyway.
Understood.
> I should be handling fixes next week, after my return from LinuxCon EU,
> gstreamer conf, audio mini-summit and media summit. This will be a too
> busy week.
I hope you'll enjoy the busy conference week. We're all hamsters in the same
threadmill, CU ;-)
Gr{oetje,eeting}s,
Geert
--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org
In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2014-10-13 19:53 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-10-02 7:21 [PATCH] [media] s5p-jpeg: Only build suspend/resume for PM Thierry Reding
2014-10-13 16:16 ` Geert Uytterhoeven
2014-10-13 16:24 ` Mauro Carvalho Chehab
2014-10-13 19:53 ` Geert Uytterhoeven
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.