s5p-jpeg: Only build suspend/resume for PM
PATCH 1/1 s5p-jpeg: Only build suspend/resume for PM
From: Thierry Reding <[email protected]>
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.
--- drivers/media/platform/s5p-jpeg/jpeg-core.c | 4 ++++ 1 file changed, 4 insertions(+)
drivers/media/platform/s5p-jpeg/jpeg-core.c +4 -0
@@ -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)
Signature · 1 line
2.1.0
Quoted 5 lines · Thierry Reding
From: Thierry Reding <[email protected]>
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.
Quoted 1 line
Signed-off-by Thierry Reding <[email protected]>
drivers/media/platform/s5p-jpeg/jpeg-core.c static int s5p_jpeg_runtime_resume(struct device *dev) · line 2685
Quoted 8 lines
drivers/media/platform/s5p-jpeg/jpeg-core.c +1
-0@@ -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 -- [email protected]
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
Em Mon, 13 Oct 2014 18:16:10 +0200
Geert Uytterhoeven <[email protected]> escreveu:
Quoted 11 lines · Thierry Reding
Quoted 5 lines
From: Thierry Reding <[email protected]>
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.
Quoted 26 lines
Quoted 1 line
Signed-off-by Thierry Reding <[email protected]>drivers/media/platform/s5p-jpeg/jpeg-core.c static int s5p_jpeg_runtime_resume(struct device *dev) · line 2685
Quoted 8 lines
drivers/media/platform/s5p-jpeg/jpeg-core.c +1
-0@@ -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 -- [email protected]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
Signature · 2 lines
Cheers, Mauro
Hi Mauro,
Quoted 11 lines · Mauro Carvalho Chehab
Em Mon, 13 Oct 2014 18:16:10 +0200
Geert Uytterhoeven <[email protected]> escreveu:Quoted 9 lines · Thierry Reding
Quoted 5 lines
From: Thierry Reding <[email protected]>
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!
Quoted 7 lines
Quoted 2 lines
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.
Quoted 3 lines
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 -- [email protected]
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