Commit 057596ee authored by Mauro Carvalho Chehab's avatar Mauro Carvalho Chehab

V4L/DVB (7133): Fix Kconfig dependencies

As pointed by Adrian Bunk, with I2C=m and VIDEO_DEV=y, videodev brokes.

This patch moves the functions that videodev needs from v4l2-common. It also
fixes some Kconfig changes.

After this patch, I2C=m / VIDEO_DEV=y will make v4l2 core statically linked
into kernel. v4l2-common will be m, and all V4L drivers will also be m.

This approach is very conservative, since it is possible to have V4L drivers
that don't need I2C or v4l2-common. The better is to map what drivers really
need v4l2-common, making them to select v4l2-common, and allowing the others to
be 'y', 'm' and 'n'.
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@infradead.org>
parent 1a4e30c3
...@@ -32,9 +32,9 @@ config VIDEO_V4L2_COMMON ...@@ -32,9 +32,9 @@ config VIDEO_V4L2_COMMON
config VIDEO_V4L1 config VIDEO_V4L1
bool "Enable Video For Linux API 1 (DEPRECATED)" bool "Enable Video For Linux API 1 (DEPRECATED)"
depends on VIDEO_DEV depends on VIDEO_DEV && VIDEO_V4L2_COMMON
default VIDEO_DEV && VIDEO_V4L2_COMMON
select VIDEO_V4L1_COMPAT select VIDEO_V4L1_COMPAT
default y
---help--- ---help---
Enables a compatibility API used by most V4L2 devices to allow Enables a compatibility API used by most V4L2 devices to allow
its usage with legacy applications that supports only V4L1 api. its usage with legacy applications that supports only V4L1 api.
...@@ -44,7 +44,7 @@ config VIDEO_V4L1 ...@@ -44,7 +44,7 @@ config VIDEO_V4L1
config VIDEO_V4L1_COMPAT config VIDEO_V4L1_COMPAT
bool "Enable Video For Linux API 1 compatible Layer" bool "Enable Video For Linux API 1 compatible Layer"
depends on VIDEO_DEV depends on VIDEO_DEV
default y default VIDEO_DEV
---help--- ---help---
This api were developed to be used at Kernel 2.2 and 2.4, but This api were developed to be used at Kernel 2.2 and 2.4, but
lacks support for several video standards. There are several lacks support for several video standards. There are several
...@@ -60,8 +60,8 @@ config VIDEO_V4L1_COMPAT ...@@ -60,8 +60,8 @@ config VIDEO_V4L1_COMPAT
config VIDEO_V4L2 config VIDEO_V4L2
bool bool
depends on VIDEO_DEV depends on VIDEO_DEV && VIDEO_V4L2_COMMON
default y default VIDEO_DEV && VIDEO_V4L2_COMMON
source "drivers/media/video/Kconfig" source "drivers/media/video/Kconfig"
...@@ -185,7 +185,6 @@ config VIDEO_TVEEPROM ...@@ -185,7 +185,6 @@ config VIDEO_TVEEPROM
config DAB config DAB
boolean "DAB adapters" boolean "DAB adapters"
default y
---help--- ---help---
Allow selecting support for for Digital Audio Broadcasting (DAB) Allow selecting support for for Digital Audio Broadcasting (DAB)
Receiver adapters. Receiver adapters.
......
...@@ -4,6 +4,6 @@ config VIDEO_SAA7146 ...@@ -4,6 +4,6 @@ config VIDEO_SAA7146
config VIDEO_SAA7146_VV config VIDEO_SAA7146_VV
tristate tristate
depends on VIDEO_DEV depends on VIDEO_V4L2
select VIDEOBUF_DMA_SG select VIDEOBUF_DMA_SG
select VIDEO_SAA7146 select VIDEO_SAA7146
...@@ -4,12 +4,12 @@ ...@@ -4,12 +4,12 @@
menuconfig RADIO_ADAPTERS menuconfig RADIO_ADAPTERS
bool "Radio Adapters" bool "Radio Adapters"
depends on VIDEO_DEV depends on VIDEO_V4L2
default y default y
---help--- ---help---
Say Y here to enable selecting AM/FM radio adapters. Say Y here to enable selecting AM/FM radio adapters.
if RADIO_ADAPTERS && VIDEO_DEV if RADIO_ADAPTERS && VIDEO_V4L2
config RADIO_CADET config RADIO_CADET
tristate "ADS Cadet AM/FM Tuner" tristate "ADS Cadet AM/FM Tuner"
......
...@@ -4,14 +4,14 @@ ...@@ -4,14 +4,14 @@
menuconfig VIDEO_CAPTURE_DRIVERS menuconfig VIDEO_CAPTURE_DRIVERS
bool "Video capture adapters" bool "Video capture adapters"
depends on VIDEO_DEV depends on VIDEO_V4L2
default y default y
---help--- ---help---
Say Y here to enable selecting the video adapters for Say Y here to enable selecting the video adapters for
webcams, analog TV, and hybrid analog/digital TV. webcams, analog TV, and hybrid analog/digital TV.
Some of those devices also supports FM radio. Some of those devices also supports FM radio.
if VIDEO_CAPTURE_DRIVERS && VIDEO_DEV if VIDEO_CAPTURE_DRIVERS && VIDEO_V4L2
config VIDEO_ADV_DEBUG config VIDEO_ADV_DEBUG
bool "Enable advanced debug functionality" bool "Enable advanced debug functionality"
......
This diff is collapsed.
This diff is collapsed.
...@@ -61,8 +61,6 @@ ...@@ -61,8 +61,6 @@
v4l_client_printk(KERN_DEBUG, client, fmt , ## arg); \ v4l_client_printk(KERN_DEBUG, client, fmt , ## arg); \
} while (0) } while (0)
/* Prints the ioctl in a human-readable format */
extern void v4l_printk_ioctl(unsigned int cmd);
/* Use this macro for non-I2C drivers. Pass the driver name as the first arg. */ /* Use this macro for non-I2C drivers. Pass the driver name as the first arg. */
#define v4l_print_ioctl(name, cmd) \ #define v4l_print_ioctl(name, cmd) \
......
...@@ -44,6 +44,8 @@ extern unsigned int v4l2_video_std_fps(struct v4l2_standard *vs); ...@@ -44,6 +44,8 @@ extern unsigned int v4l2_video_std_fps(struct v4l2_standard *vs);
extern char *v4l2_norm_to_name(v4l2_std_id id); extern char *v4l2_norm_to_name(v4l2_std_id id);
extern int v4l2_video_std_construct(struct v4l2_standard *vs, extern int v4l2_video_std_construct(struct v4l2_standard *vs,
int id, char *name); int id, char *name);
/* Prints the ioctl in a human-readable format */
extern void v4l_printk_ioctl(unsigned int cmd);
/* prority handling */ /* prority handling */
struct v4l2_prio_state { struct v4l2_prio_state {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment