[PATCH] media: Kconfig: make filtering devices optional

From: Mauro Carvalho Chehab
Date: Tue Mar 24 2020 - 06:39:59 EST


The per-device option selection is a feature that some
developers love, while others hate...

So, let's make both happy by making it optional.

Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@xxxxxxxxxx>

drivers/media/Kconfig | 41 ++++++++++++++++++++++++++++++++++++++---
1 file changed, 38 insertions(+), 3 deletions(-)

diff --git a/drivers/media/Kconfig b/drivers/media/Kconfig
index 4c06728a4ab7..85476197837c 100644
--- a/drivers/media/Kconfig
+++ b/drivers/media/Kconfig
@@ -25,9 +25,13 @@ menuconfig MEDIA_SUPPORT
Additional info and docs are available on the web at
<https://linuxtv.org>

-menu "Types of devices to be supported"
+if MEDIA_SUPPORT
+
+menuconfig MEDIA_SUPPORT_FILTER
+ bool "Filter devices by their types"
depends on MEDIA_SUPPORT

+if MEDIA_SUPPORT_FILTER
#
# Multimedia support - automatically enable V4L2 and DVB core
#
@@ -106,10 +110,41 @@ config MEDIA_TEST_SUPPORT
have regressions.

Say Y when you have a software defined radio device.
+endif #MEDIA_SUPPORT_FILTER

-endmenu # media support types
+if !MEDIA_SUPPORT_FILTER
+config MEDIA_CAMERA_SUPPORT
+ bool
+ default y

-if MEDIA_SUPPORT
+config MEDIA_ANALOG_TV_SUPPORT
+ bool
+ default y
+
+config MEDIA_DIGITAL_TV_SUPPORT
+ bool
+ default y
+
+config MEDIA_RADIO_SUPPORT
+ bool
+ default y
+
+config MEDIA_SDR_SUPPORT
+ bool
+ default y
+
+config MEDIA_CEC_SUPPORT
+ bool
+ default y
+
+config MEDIA_EMBEDDED_SUPPORT
+ bool
+ default y
+
+config MEDIA_TEST_SUPPORT
+ bool
+ default y
+endif #MEDIA_SUPPORT_FILTER

comment "Media core options"

--
2.24.1