diff options
-rw-r--r-- | drivers/media/Kconfig | 5 | ||||
-rw-r--r-- | drivers/media/video/Makefile | 5 | ||||
-rw-r--r-- | drivers/media/video/v4l2-common.c | 38 |
3 files changed, 24 insertions, 24 deletions
diff --git a/drivers/media/Kconfig b/drivers/media/Kconfig index 8f4a45346de7..707b20d7efb7 100644 --- a/drivers/media/Kconfig +++ b/drivers/media/Kconfig | |||
@@ -25,6 +25,11 @@ config VIDEO_DEV | |||
25 | To compile this driver as a module, choose M here: the | 25 | To compile this driver as a module, choose M here: the |
26 | module will be called videodev. | 26 | module will be called videodev. |
27 | 27 | ||
28 | config VIDEO_V4L2_COMMON | ||
29 | tristate | ||
30 | depends on (I2C || I2C=n) && VIDEO_DEV | ||
31 | default (I2C || I2C=n) && VIDEO_DEV | ||
32 | |||
28 | config VIDEO_V4L1 | 33 | config VIDEO_V4L1 |
29 | bool "Enable Video For Linux API 1 (DEPRECATED)" | 34 | bool "Enable Video For Linux API 1 (DEPRECATED)" |
30 | depends on VIDEO_DEV | 35 | depends on VIDEO_DEV |
diff --git a/drivers/media/video/Makefile b/drivers/media/video/Makefile index 850b8c6f4577..3f209b32eeac 100644 --- a/drivers/media/video/Makefile +++ b/drivers/media/video/Makefile | |||
@@ -10,8 +10,9 @@ msp3400-objs := msp3400-driver.o msp3400-kthreads.o | |||
10 | 10 | ||
11 | stkwebcam-objs := stk-webcam.o stk-sensor.o | 11 | stkwebcam-objs := stk-webcam.o stk-sensor.o |
12 | 12 | ||
13 | obj-$(CONFIG_VIDEO_DEV) += videodev.o v4l2-common.o compat_ioctl32.o \ | 13 | obj-$(CONFIG_VIDEO_DEV) += videodev.o compat_ioctl32.o v4l2-int-device.o |
14 | v4l2-int-device.o | 14 | |
15 | obj-$(CONFIG_VIDEO_V4L2_COMMON) += v4l2-common.o | ||
15 | 16 | ||
16 | ifeq ($(CONFIG_VIDEO_V4L1_COMPAT),y) | 17 | ifeq ($(CONFIG_VIDEO_V4L1_COMPAT),y) |
17 | obj-$(CONFIG_VIDEO_DEV) += v4l1-compat.o | 18 | obj-$(CONFIG_VIDEO_DEV) += v4l1-compat.o |
diff --git a/drivers/media/video/v4l2-common.c b/drivers/media/video/v4l2-common.c index c056ff6d810c..74d0a5996697 100644 --- a/drivers/media/video/v4l2-common.c +++ b/drivers/media/video/v4l2-common.c | |||
@@ -973,6 +973,18 @@ u32 v4l2_ctrl_next(const u32 * const * ctrl_classes, u32 id) | |||
973 | return **ctrl_classes; | 973 | return **ctrl_classes; |
974 | } | 974 | } |
975 | 975 | ||
976 | int v4l2_chip_match_host(u32 match_type, u32 match_chip) | ||
977 | { | ||
978 | switch (match_type) { | ||
979 | case V4L2_CHIP_MATCH_HOST: | ||
980 | return match_chip == 0; | ||
981 | default: | ||
982 | return 0; | ||
983 | } | ||
984 | } | ||
985 | EXPORT_SYMBOL(v4l2_chip_match_host); | ||
986 | |||
987 | #if defined(CONFIG_I2C) || (defined(CONFIG_I2C_MODULE) && defined(MODULE)) | ||
976 | int v4l2_chip_match_i2c_client(struct i2c_client *c, u32 match_type, u32 match_chip) | 988 | int v4l2_chip_match_i2c_client(struct i2c_client *c, u32 match_type, u32 match_chip) |
977 | { | 989 | { |
978 | switch (match_type) { | 990 | switch (match_type) { |
@@ -984,6 +996,7 @@ int v4l2_chip_match_i2c_client(struct i2c_client *c, u32 match_type, u32 match_c | |||
984 | return 0; | 996 | return 0; |
985 | } | 997 | } |
986 | } | 998 | } |
999 | EXPORT_SYMBOL(v4l2_chip_match_i2c_client); | ||
987 | 1000 | ||
988 | int v4l2_chip_ident_i2c_client(struct i2c_client *c, struct v4l2_chip_ident *chip, | 1001 | int v4l2_chip_ident_i2c_client(struct i2c_client *c, struct v4l2_chip_ident *chip, |
989 | u32 ident, u32 revision) | 1002 | u32 ident, u32 revision) |
@@ -1000,16 +1013,7 @@ int v4l2_chip_ident_i2c_client(struct i2c_client *c, struct v4l2_chip_ident *chi | |||
1000 | } | 1013 | } |
1001 | return 0; | 1014 | return 0; |
1002 | } | 1015 | } |
1003 | 1016 | EXPORT_SYMBOL(v4l2_chip_ident_i2c_client); | |
1004 | int v4l2_chip_match_host(u32 match_type, u32 match_chip) | ||
1005 | { | ||
1006 | switch (match_type) { | ||
1007 | case V4L2_CHIP_MATCH_HOST: | ||
1008 | return match_chip == 0; | ||
1009 | default: | ||
1010 | return 0; | ||
1011 | } | ||
1012 | } | ||
1013 | 1017 | ||
1014 | /* ----------------------------------------------------------------- */ | 1018 | /* ----------------------------------------------------------------- */ |
1015 | 1019 | ||
@@ -1038,6 +1042,8 @@ int v4l2_i2c_attach(struct i2c_adapter *adapter, int address, struct i2c_driver | |||
1038 | } | 1042 | } |
1039 | return err != -ENOMEM ? 0 : err; | 1043 | return err != -ENOMEM ? 0 : err; |
1040 | } | 1044 | } |
1045 | EXPORT_SYMBOL(v4l2_i2c_attach); | ||
1046 | #endif | ||
1041 | 1047 | ||
1042 | /* ----------------------------------------------------------------- */ | 1048 | /* ----------------------------------------------------------------- */ |
1043 | 1049 | ||
@@ -1061,15 +1067,3 @@ EXPORT_SYMBOL(v4l2_ctrl_get_menu); | |||
1061 | EXPORT_SYMBOL(v4l2_ctrl_query_menu); | 1067 | EXPORT_SYMBOL(v4l2_ctrl_query_menu); |
1062 | EXPORT_SYMBOL(v4l2_ctrl_query_fill); | 1068 | EXPORT_SYMBOL(v4l2_ctrl_query_fill); |
1063 | EXPORT_SYMBOL(v4l2_ctrl_query_fill_std); | 1069 | EXPORT_SYMBOL(v4l2_ctrl_query_fill_std); |
1064 | |||
1065 | EXPORT_SYMBOL(v4l2_chip_match_i2c_client); | ||
1066 | EXPORT_SYMBOL(v4l2_chip_ident_i2c_client); | ||
1067 | EXPORT_SYMBOL(v4l2_chip_match_host); | ||
1068 | |||
1069 | EXPORT_SYMBOL(v4l2_i2c_attach); | ||
1070 | |||
1071 | /* | ||
1072 | * Local variables: | ||
1073 | * c-basic-offset: 8 | ||
1074 | * End: | ||
1075 | */ | ||