* [PATCH 1/2] [media] vsp1: use __maybe_unused for PM handlers
@ 2016-06-30 12:23 Arnd Bergmann
2016-06-30 12:23 ` [PATCH 2/2] [media] vsp1: clarify FCP dependency Arnd Bergmann
0 siblings, 1 reply; 2+ messages in thread
From: Arnd Bergmann @ 2016-06-30 12:23 UTC (permalink / raw)
To: Mauro Carvalho Chehab
Cc: Laurent Pinchart, Arnd Bergmann, Laurent Pinchart, linux-media,
linux-renesas-soc, linux-kernel
Building without CONFIG_PM results in a harmless warning from
slightly incorrect #ifdef guards:
drivers/media/platform/vsp1/vsp1_drv.c:525:12: error: 'vsp1_pm_runtime_resume' defined but not used [-Werror=unused-function]
drivers/media/platform/vsp1/vsp1_drv.c:516:12: error: 'vsp1_pm_runtime_suspend' defined but not used [-Werror=unused-function]
This removes the existing #ifdef and instead marks all four
PM functions as __maybe_unused.
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Fixes: 1e6af546ee66 ("[media] v4l: vsp1: Implement runtime PM support")
---
drivers/media/platform/vsp1/vsp1_drv.c | 10 ++++------
1 file changed, 4 insertions(+), 6 deletions(-)
diff --git a/drivers/media/platform/vsp1/vsp1_drv.c b/drivers/media/platform/vsp1/vsp1_drv.c
index e655639af7e2..0c7fd43d6fb7 100644
--- a/drivers/media/platform/vsp1/vsp1_drv.c
+++ b/drivers/media/platform/vsp1/vsp1_drv.c
@@ -491,8 +491,7 @@ void vsp1_device_put(struct vsp1_device *vsp1)
* Power Management
*/
-#ifdef CONFIG_PM_SLEEP
-static int vsp1_pm_suspend(struct device *dev)
+static int __maybe_unused vsp1_pm_suspend(struct device *dev)
{
struct vsp1_device *vsp1 = dev_get_drvdata(dev);
@@ -502,7 +501,7 @@ static int vsp1_pm_suspend(struct device *dev)
return 0;
}
-static int vsp1_pm_resume(struct device *dev)
+static int __maybe_unused vsp1_pm_resume(struct device *dev)
{
struct vsp1_device *vsp1 = dev_get_drvdata(dev);
@@ -511,9 +510,8 @@ static int vsp1_pm_resume(struct device *dev)
return 0;
}
-#endif
-static int vsp1_pm_runtime_suspend(struct device *dev)
+static int __maybe_unused vsp1_pm_runtime_suspend(struct device *dev)
{
struct vsp1_device *vsp1 = dev_get_drvdata(dev);
@@ -522,7 +520,7 @@ static int vsp1_pm_runtime_suspend(struct device *dev)
return 0;
}
-static int vsp1_pm_runtime_resume(struct device *dev)
+static int __maybe_unused vsp1_pm_runtime_resume(struct device *dev)
{
struct vsp1_device *vsp1 = dev_get_drvdata(dev);
int ret;
--
2.9.0
^ permalink raw reply [flat|nested] 2+ messages in thread
* [PATCH 2/2] [media] vsp1: clarify FCP dependency
2016-06-30 12:23 [PATCH 1/2] [media] vsp1: use __maybe_unused for PM handlers Arnd Bergmann
@ 2016-06-30 12:23 ` Arnd Bergmann
0 siblings, 0 replies; 2+ messages in thread
From: Arnd Bergmann @ 2016-06-30 12:23 UTC (permalink / raw)
To: Mauro Carvalho Chehab
Cc: Laurent Pinchart, Arnd Bergmann, Hans Verkuil, Simon Horman,
linux-media, linux-kernel
The newly added FCP support in the vsp1 driver causes a link error
when CONFIG_RENESAS_FCP=m, since it's not reachable by built-in code:
drivers/media/built-in.o: In function `vsp1_remove':
:(.text+0xdeca0): undefined reference to `rcar_fcp_put'
drivers/media/built-in.o: In function `vsp1_probe':
:(.text+0xdef44): undefined reference to `rcar_fcp_get'
We already have a conditional dependency on FCP that requires
it for ARM64, so for all others we just have to prevent setting
RENESAS_VSP1=y when RENESAS_FCP=m by extending the FCP dependency.
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Fixes: 94fcdf829793 ("[media] v4l: vsp1: Add FCP support")
---
drivers/media/platform/Kconfig | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/media/platform/Kconfig b/drivers/media/platform/Kconfig
index 9d0a3ffe36d2..8b6ac7d08289 100644
--- a/drivers/media/platform/Kconfig
+++ b/drivers/media/platform/Kconfig
@@ -265,7 +265,7 @@ config VIDEO_RENESAS_VSP1
tristate "Renesas VSP1 Video Processing Engine"
depends on VIDEO_V4L2 && VIDEO_V4L2_SUBDEV_API && HAS_DMA
depends on (ARCH_RENESAS && OF) || COMPILE_TEST
- depends on !ARM64 || VIDEO_RENESAS_FCP
+ depends on (!ARM64 && !VIDEO_RENESAS_FCP) || VIDEO_RENESAS_FCP
select VIDEOBUF2_DMA_CONTIG
---help---
This is a V4L2 driver for the Renesas VSP1 video processing engine.
--
2.9.0
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2016-06-30 12:21 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-06-30 12:23 [PATCH 1/2] [media] vsp1: use __maybe_unused for PM handlers Arnd Bergmann
2016-06-30 12:23 ` [PATCH 2/2] [media] vsp1: clarify FCP dependency Arnd Bergmann
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®