media: Kconfig: fix selection for test drivers
authorMauro Carvalho Chehab <mchehab+huawei@kernel.org>
Thu, 26 Mar 2020 14:47:25 +0000 (15:47 +0100)
committerMauro Carvalho Chehab <mchehab+huawei@kernel.org>
Tue, 14 Apr 2020 08:29:05 +0000 (10:29 +0200)
There are some long-time mistakes related to build test
drivers, with regards to depends on/select. Also, as we
now want to build any test driver without needing to
enable anything else, change the logic in order to properly
filter them.

Please notice that the PCI skeleton is somewhat an
exception, as it requires to select *both* SAMPLES and
MEDIA_TEST_SUPPORT. I almost changed it to be either one,
but decided to keep it as-is, as this is something that
we don't really need to be included on any distribution.

The only reason for someone to build it is for COMPILE_TEST
purposes.

Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
drivers/media/Kconfig
drivers/media/dvb-frontends/Kconfig
drivers/media/pci/Kconfig
drivers/media/test_drivers/Kconfig

index f400370b29282d48ca8c1d12a1f8186d161d43f0..9c32616f863af9f2abdf3e1aa6caee139f443224 100644 (file)
@@ -119,7 +119,7 @@ comment "Video4Linux core enabled to support hybrid TV devices"
 config VIDEO_DEV
        tristate
        prompt "Video4Linux core" if !(MEDIA_HYBRID_USB || MEDIA_HYBRID_PCI)
-       default MEDIA_CAMERA_SUPPORT || MEDIA_ANALOG_TV_SUPPORT || MEDIA_RADIO_SUPPORT || MEDIA_SDR_SUPPORT || MEDIA_PLATFORM_SUPPORT || MEDIA_HYBRID_USB || MEDIA_HYBRID_PCI
+       default MEDIA_CAMERA_SUPPORT || MEDIA_ANALOG_TV_SUPPORT || MEDIA_RADIO_SUPPORT || MEDIA_SDR_SUPPORT || MEDIA_PLATFORM_SUPPORT || MEDIA_TEST_SUPPORT || MEDIA_HYBRID_USB || MEDIA_HYBRID_PCI
 
 config VIDEO_V4L2_SUBDEV_API
        bool "V4L2 sub-device userspace API"
index 932fd88fdc127dbcc7d55d274cd65b81365e3daf..1f45808d94da4b6724960117194dcad79055436e 100644 (file)
@@ -1,3 +1,5 @@
+if MEDIA_DIGITAL_TV_SUPPORT
+
 comment "DVB Frontend drivers hidden by 'Autoselect ancillary drivers'"
        depends on MEDIA_HIDE_ANCILLARY_SUBDRV
 
@@ -943,13 +945,16 @@ config DVB_SP2
        help
          CIMaX SP2/SP2HF Common Interface module.
 
+endmenu # Customise DVB Frontends
+
+endif # MEDIA_DIGITAL_TV_SUPPORT
+
 comment "Tools to develop new frontends"
        depends on MEDIA_TEST_SUPPORT
 
 config DVB_DUMMY_FE
        tristate "Dummy frontend driver"
-       depends on DVB_CORE
        depends on MEDIA_TEST_SUPPORT
+       select DVB_CORE
        help
          Dummy skeleton frontend driver.
-endmenu
index 348da044ec7801cf7ccae386a77518d42b526582..44f1efd21272e43d23f46ebeed41d0ae897a48b8 100644 (file)
@@ -6,7 +6,7 @@ config MEDIA_HYBRID_PCI
        depends on VIDEO_CX18 || VIDEO_CX23885 || VIDEO_CX88 || VIDEO_BT848 || VIDEO_SAA7134 || VIDEO_SAA7164
        default y
 
-if PCI && MEDIA_SUPPORT
+if PCI
 
 menuconfig MEDIA_PCI_SUPPORT
        bool "Media PCI Adapters"
@@ -65,11 +65,11 @@ source "drivers/media/pci/intel/ipu3/Kconfig"
 
 config VIDEO_PCI_SKELETON
        tristate "Skeleton PCI V4L2 driver"
-       depends on MEDIA_TEST_SUPPORT
-       depends on PCI
        depends on SAMPLES
-       depends on VIDEO_V4L2 && VIDEOBUF2_CORE
-       depends on VIDEOBUF2_MEMOPS && VIDEOBUF2_DMA_CONTIG
+       depends on MEDIA_TEST_SUPPORT
+       depends on PCI && VIDEO_V4L2
+       select VIDEOBUF2_MEMOPS
+       select VIDEOBUF2_DMA_CONTIG
        help
          Enable build of the skeleton PCI driver, used as a reference
          when developing new drivers.
index 258a4d36c0d3777f80d177f16752baea997ce194..9f4a9cfbacc9cf5d15bb921ecd2a5e40952042a7 100644 (file)
@@ -4,7 +4,7 @@ if MEDIA_TEST_SUPPORT
 
 menuconfig V4L_TEST_DRIVERS
        bool "V4L test drivers"
-       depends on MEDIA_CAMERA_SUPPORT
+       depends on VIDEO_DEV
 
 if V4L_TEST_DRIVERS