* [PATCH 1/3] [media] s5p_cec: mark suspend/resume as __maybe_unused
@ 2016-06-29 14:26 Arnd Bergmann
2016-06-29 14:26 ` [PATCH 2/3] [media] cec: add MEDIA_SUPPORT dependency Arnd Bergmann
2016-06-29 14:26 ` [PATCH 3/3] [media] cec: add RC_CORE dependency Arnd Bergmann
0 siblings, 2 replies; 3+ messages in thread
From: Arnd Bergmann @ 2016-06-29 14:26 UTC (permalink / raw)
To: Mauro Carvalho Chehab
Cc: Arnd Bergmann, Greg Kroah-Hartman, Kamil Debski, Hans Verkuil,
linux-media, devel, linux-kernel
The suspend/resume functions in the s5p-cec driver are only
referenced when CONFIG_PM is enabled, so we get a warning
about unused functions otherwise:
drivers/staging/media/s5p-cec/s5p_cec.c:260:12: error: 's5p_cec_resume' defined but not used [-Werror=unused-function]
static int s5p_cec_resume(struct device *dev)
^~~~~~~~~~~~~~
drivers/staging/media/s5p-cec/s5p_cec.c:253:12: error: 's5p_cec_suspend' defined but not used [-Werror=unused-function]
static int s5p_cec_suspend(struct device *dev)
This marks them as __maybe_unused to avoid the warning without
having to introduce an extra #ifdef.
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
drivers/staging/media/s5p-cec/s5p_cec.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/staging/media/s5p-cec/s5p_cec.c b/drivers/staging/media/s5p-cec/s5p_cec.c
index f90b7c4e48fe..78333273c4e5 100644
--- a/drivers/staging/media/s5p-cec/s5p_cec.c
+++ b/drivers/staging/media/s5p-cec/s5p_cec.c
@@ -250,14 +250,14 @@ static int s5p_cec_runtime_resume(struct device *dev)
return 0;
}
-static int s5p_cec_suspend(struct device *dev)
+static int __maybe_unused s5p_cec_suspend(struct device *dev)
{
if (pm_runtime_suspended(dev))
return 0;
return s5p_cec_runtime_suspend(dev);
}
-static int s5p_cec_resume(struct device *dev)
+static int __maybe_unused s5p_cec_resume(struct device *dev)
{
if (pm_runtime_suspended(dev))
return 0;
--
2.9.0
^ permalink raw reply related [flat|nested] 3+ messages in thread
* [PATCH 2/3] [media] cec: add MEDIA_SUPPORT dependency
2016-06-29 14:26 [PATCH 1/3] [media] s5p_cec: mark suspend/resume as __maybe_unused Arnd Bergmann
@ 2016-06-29 14:26 ` Arnd Bergmann
2016-06-29 14:26 ` [PATCH 3/3] [media] cec: add RC_CORE dependency Arnd Bergmann
1 sibling, 0 replies; 3+ messages in thread
From: Arnd Bergmann @ 2016-06-29 14:26 UTC (permalink / raw)
To: Mauro Carvalho Chehab
Cc: Arnd Bergmann, Hans Verkuil, Greg Kroah-Hartman, Kamil Debski,
linux-media, devel, linux-kernel
The MEDIA_CEC_EDID option is guarded by MEDIA_SUPPORT, so selecting
it from MEDIA_CEC produces a warning:
warning: (MEDIA_CEC) selects MEDIA_CEC_EDID which has unmet direct dependencies (MEDIA_SUPPORT)
The warning is harmless, but it's better to add an explicit
dependency to shut it up, to reduce the noise during randconfig
builds.
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Fixes: ca684386e6e2 ("[media] cec: add HDMI CEC framework (api)")
---
drivers/staging/media/cec/Kconfig | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/staging/media/cec/Kconfig b/drivers/staging/media/cec/Kconfig
index 8a7aceeac815..cd523590ea6f 100644
--- a/drivers/staging/media/cec/Kconfig
+++ b/drivers/staging/media/cec/Kconfig
@@ -1,5 +1,6 @@
config MEDIA_CEC
tristate "CEC API (EXPERIMENTAL)"
+ depends on MEDIA_SUPPORT
select MEDIA_CEC_EDID
---help---
Enable the CEC API.
--
2.9.0
^ permalink raw reply related [flat|nested] 3+ messages in thread
* [PATCH 3/3] [media] cec: add RC_CORE dependency
2016-06-29 14:26 [PATCH 1/3] [media] s5p_cec: mark suspend/resume as __maybe_unused Arnd Bergmann
2016-06-29 14:26 ` [PATCH 2/3] [media] cec: add MEDIA_SUPPORT dependency Arnd Bergmann
@ 2016-06-29 14:26 ` Arnd Bergmann
1 sibling, 0 replies; 3+ messages in thread
From: Arnd Bergmann @ 2016-06-29 14:26 UTC (permalink / raw)
To: Mauro Carvalho Chehab
Cc: Arnd Bergmann, Hans Verkuil, Greg Kroah-Hartman, Kamil Debski,
linux-media, devel, linux-kernel
We cannot build the cec driver when the RC core is a module
and cec is built-in:
drivers/staging/built-in.o: In function `cec_allocate_adapter':
:(.text+0x134): undefined reference to `rc_allocate_device'
drivers/staging/built-in.o: In function `cec_register_adapter':
:(.text+0x304): undefined reference to `rc_register_device'
This adds an explicit dependency to avoid this case. We still
allow building when CONFIG_RC_CORE is disabled completely,
as the driver has checks for this case itself.
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
drivers/staging/media/cec/Kconfig | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/staging/media/cec/Kconfig b/drivers/staging/media/cec/Kconfig
index cd523590ea6f..b83b4d83946d 100644
--- a/drivers/staging/media/cec/Kconfig
+++ b/drivers/staging/media/cec/Kconfig
@@ -1,6 +1,7 @@
config MEDIA_CEC
tristate "CEC API (EXPERIMENTAL)"
depends on MEDIA_SUPPORT
+ depends on RC_CORE || !RC_CORE
select MEDIA_CEC_EDID
---help---
Enable the CEC API.
--
2.9.0
^ permalink raw reply related [flat|nested] 3+ messages in thread
end of thread, other threads:[~2016-06-29 14:26 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-06-29 14:26 [PATCH 1/3] [media] s5p_cec: mark suspend/resume as __maybe_unused Arnd Bergmann
2016-06-29 14:26 ` [PATCH 2/3] [media] cec: add MEDIA_SUPPORT dependency Arnd Bergmann
2016-06-29 14:26 ` [PATCH 3/3] [media] cec: add RC_CORE 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;
as well as URLs for NNTP newsgroup(s).