diff options
-rw-r--r-- | drivers/media/Kconfig | 9 | ||||
-rw-r--r-- | drivers/media/video/msp3400-driver.c | 4 | ||||
-rw-r--r-- | drivers/media/video/tuner-core.c | 2 | ||||
-rw-r--r-- | drivers/media/video/zoran.h | 16 | ||||
-rw-r--r-- | drivers/media/video/zoran_driver.c | 18 |
5 files changed, 12 insertions, 37 deletions
diff --git a/drivers/media/Kconfig b/drivers/media/Kconfig index 1f7244cffe2f..128bb9cd5755 100644 --- a/drivers/media/Kconfig +++ b/drivers/media/Kconfig | |||
@@ -30,7 +30,7 @@ config VIDEO_V4L2_COMMON | |||
30 | depends on (I2C || I2C=n) && VIDEO_DEV | 30 | depends on (I2C || I2C=n) && VIDEO_DEV |
31 | default (I2C || I2C=n) && VIDEO_DEV | 31 | default (I2C || I2C=n) && VIDEO_DEV |
32 | 32 | ||
33 | config VIDEO_V4L1 | 33 | config VIDEO_ALLOW_V4L1 |
34 | bool "Enable Video For Linux API 1 (DEPRECATED)" | 34 | bool "Enable Video For Linux API 1 (DEPRECATED)" |
35 | depends on VIDEO_DEV && VIDEO_V4L2_COMMON | 35 | depends on VIDEO_DEV && VIDEO_V4L2_COMMON |
36 | default VIDEO_DEV && VIDEO_V4L2_COMMON | 36 | default VIDEO_DEV && VIDEO_V4L2_COMMON |
@@ -59,10 +59,15 @@ config VIDEO_V4L1_COMPAT | |||
59 | If you are unsure as to whether this is required, answer Y. | 59 | If you are unsure as to whether this is required, answer Y. |
60 | 60 | ||
61 | config VIDEO_V4L2 | 61 | config VIDEO_V4L2 |
62 | bool | 62 | tristate |
63 | depends on VIDEO_DEV && VIDEO_V4L2_COMMON | 63 | depends on VIDEO_DEV && VIDEO_V4L2_COMMON |
64 | default VIDEO_DEV && VIDEO_V4L2_COMMON | 64 | default VIDEO_DEV && VIDEO_V4L2_COMMON |
65 | 65 | ||
66 | config VIDEO_V4L1 | ||
67 | tristate | ||
68 | depends on VIDEO_DEV && VIDEO_V4L2_COMMON && VIDEO_ALLOW_V4L1 | ||
69 | default VIDEO_DEV && VIDEO_V4L2_COMMON && VIDEO_ALLOW_V4L1 | ||
70 | |||
66 | source "drivers/media/video/Kconfig" | 71 | source "drivers/media/video/Kconfig" |
67 | 72 | ||
68 | source "drivers/media/radio/Kconfig" | 73 | source "drivers/media/radio/Kconfig" |
diff --git a/drivers/media/video/msp3400-driver.c b/drivers/media/video/msp3400-driver.c index 7a11f3159e32..b73c740f7fb2 100644 --- a/drivers/media/video/msp3400-driver.c +++ b/drivers/media/video/msp3400-driver.c | |||
@@ -366,7 +366,7 @@ int msp_sleep(struct msp_state *state, int timeout) | |||
366 | } | 366 | } |
367 | 367 | ||
368 | /* ------------------------------------------------------------------------ */ | 368 | /* ------------------------------------------------------------------------ */ |
369 | #ifdef CONFIG_VIDEO_V4L1 | 369 | #ifdef CONFIG_VIDEO_ALLOW_V4L1 |
370 | static int msp_mode_v4l2_to_v4l1(int rxsubchans, int audmode) | 370 | static int msp_mode_v4l2_to_v4l1(int rxsubchans, int audmode) |
371 | { | 371 | { |
372 | if (rxsubchans == V4L2_TUNER_SUB_MONO) | 372 | if (rxsubchans == V4L2_TUNER_SUB_MONO) |
@@ -514,7 +514,7 @@ static int msp_command(struct i2c_client *client, unsigned int cmd, void *arg) | |||
514 | /* --- v4l ioctls --- */ | 514 | /* --- v4l ioctls --- */ |
515 | /* take care: bttv does userspace copying, we'll get a | 515 | /* take care: bttv does userspace copying, we'll get a |
516 | kernel pointer here... */ | 516 | kernel pointer here... */ |
517 | #ifdef CONFIG_VIDEO_V4L1 | 517 | #ifdef CONFIG_VIDEO_ALLOW_V4L1 |
518 | case VIDIOCGAUDIO: | 518 | case VIDIOCGAUDIO: |
519 | { | 519 | { |
520 | struct video_audio *va = arg; | 520 | struct video_audio *va = arg; |
diff --git a/drivers/media/video/tuner-core.c b/drivers/media/video/tuner-core.c index 225e8f8df1a5..e886f48a2909 100644 --- a/drivers/media/video/tuner-core.c +++ b/drivers/media/video/tuner-core.c | |||
@@ -758,7 +758,7 @@ static int tuner_command(struct i2c_client *client, unsigned int cmd, void *arg) | |||
758 | if (analog_ops->standby) | 758 | if (analog_ops->standby) |
759 | analog_ops->standby(&t->fe); | 759 | analog_ops->standby(&t->fe); |
760 | break; | 760 | break; |
761 | #ifdef CONFIG_VIDEO_V4L1 | 761 | #ifdef CONFIG_VIDEO_ALLOW_V4L1 |
762 | case VIDIOCSAUDIO: | 762 | case VIDIOCSAUDIO: |
763 | if (check_mode(t, "VIDIOCSAUDIO") == EINVAL) | 763 | if (check_mode(t, "VIDIOCSAUDIO") == EINVAL) |
764 | return 0; | 764 | return 0; |
diff --git a/drivers/media/video/zoran.h b/drivers/media/video/zoran.h index 498a43c1f2b1..81cc3b00a079 100644 --- a/drivers/media/video/zoran.h +++ b/drivers/media/video/zoran.h | |||
@@ -243,10 +243,8 @@ struct zoran_format { | |||
243 | #ifdef CONFIG_VIDEO_V4L1_COMPAT | 243 | #ifdef CONFIG_VIDEO_V4L1_COMPAT |
244 | int palette; | 244 | int palette; |
245 | #endif | 245 | #endif |
246 | #ifdef CONFIG_VIDEO_V4L2 | ||
247 | __u32 fourcc; | 246 | __u32 fourcc; |
248 | int colorspace; | 247 | int colorspace; |
249 | #endif | ||
250 | int depth; | 248 | int depth; |
251 | __u32 flags; | 249 | __u32 flags; |
252 | __u32 vfespfr; | 250 | __u32 vfespfr; |
@@ -271,20 +269,6 @@ struct zoran_v4l_settings { | |||
271 | const struct zoran_format *format; /* capture format */ | 269 | const struct zoran_format *format; /* capture format */ |
272 | }; | 270 | }; |
273 | 271 | ||
274 | /* whoops, this one is undeclared if !v4l2 */ | ||
275 | #ifndef CONFIG_VIDEO_V4L2 | ||
276 | struct v4l2_jpegcompression { | ||
277 | int quality; | ||
278 | int APPn; | ||
279 | int APP_len; | ||
280 | char APP_data[60]; | ||
281 | int COM_len; | ||
282 | char COM_data[60]; | ||
283 | __u32 jpeg_markers; | ||
284 | __u8 reserved[116]; | ||
285 | }; | ||
286 | #endif | ||
287 | |||
288 | /* jpg-capture/-playback settings */ | 272 | /* jpg-capture/-playback settings */ |
289 | struct zoran_jpg_settings { | 273 | struct zoran_jpg_settings { |
290 | int decimation; /* this bit is used to set everything to default */ | 274 | int decimation; /* this bit is used to set everything to default */ |
diff --git a/drivers/media/video/zoran_driver.c b/drivers/media/video/zoran_driver.c index 1a002eaeb06c..0134bec1e399 100644 --- a/drivers/media/video/zoran_driver.c +++ b/drivers/media/video/zoran_driver.c | |||
@@ -85,7 +85,6 @@ | |||
85 | #include "zoran_device.h" | 85 | #include "zoran_device.h" |
86 | #include "zoran_card.h" | 86 | #include "zoran_card.h" |
87 | 87 | ||
88 | #ifdef CONFIG_VIDEO_V4L2 | ||
89 | /* we declare some card type definitions here, they mean | 88 | /* we declare some card type definitions here, they mean |
90 | * the same as the v4l1 ZORAN_VID_TYPE above, except it's v4l2 */ | 89 | * the same as the v4l1 ZORAN_VID_TYPE above, except it's v4l2 */ |
91 | #define ZORAN_V4L2_VID_FLAGS ( \ | 90 | #define ZORAN_V4L2_VID_FLAGS ( \ |
@@ -94,19 +93,15 @@ | |||
94 | V4L2_CAP_VIDEO_OUTPUT |\ | 93 | V4L2_CAP_VIDEO_OUTPUT |\ |
95 | V4L2_CAP_VIDEO_OVERLAY \ | 94 | V4L2_CAP_VIDEO_OVERLAY \ |
96 | ) | 95 | ) |
97 | #endif | ||
98 | 96 | ||
99 | #include <asm/byteorder.h> | 97 | #include <asm/byteorder.h> |
100 | 98 | ||
101 | #if defined(CONFIG_VIDEO_V4L2) && defined(CONFIG_VIDEO_V4L1_COMPAT) | 99 | #if defined(CONFIG_VIDEO_V4L1_COMPAT) |
102 | #define ZFMT(pal, fcc, cs) \ | 100 | #define ZFMT(pal, fcc, cs) \ |
103 | .palette = (pal), .fourcc = (fcc), .colorspace = (cs) | 101 | .palette = (pal), .fourcc = (fcc), .colorspace = (cs) |
104 | #elif defined(CONFIG_VIDEO_V4L2) | ||
105 | #define ZFMT(pal, fcc, cs) \ | ||
106 | .fourcc = (fcc), .colorspace = (cs) | ||
107 | #else | 102 | #else |
108 | #define ZFMT(pal, fcc, cs) \ | 103 | #define ZFMT(pal, fcc, cs) \ |
109 | .palette = (pal) | 104 | .fourcc = (fcc), .colorspace = (cs) |
110 | #endif | 105 | #endif |
111 | 106 | ||
112 | const struct zoran_format zoran_formats[] = { | 107 | const struct zoran_format zoran_formats[] = { |
@@ -209,7 +204,6 @@ static int lock_norm; /* 0 = default 1 = Don't change TV standard (norm) */ | |||
209 | module_param(lock_norm, int, 0644); | 204 | module_param(lock_norm, int, 0644); |
210 | MODULE_PARM_DESC(lock_norm, "Prevent norm changes (1 = ignore, >1 = fail)"); | 205 | MODULE_PARM_DESC(lock_norm, "Prevent norm changes (1 = ignore, >1 = fail)"); |
211 | 206 | ||
212 | #ifdef CONFIG_VIDEO_V4L2 | ||
213 | /* small helper function for calculating buffersizes for v4l2 | 207 | /* small helper function for calculating buffersizes for v4l2 |
214 | * we calculate the nearest higher power-of-two, which | 208 | * we calculate the nearest higher power-of-two, which |
215 | * will be the recommended buffersize */ | 209 | * will be the recommended buffersize */ |
@@ -232,7 +226,6 @@ zoran_v4l2_calc_bufsize (struct zoran_jpg_settings *settings) | |||
232 | return 8192; | 226 | return 8192; |
233 | return result; | 227 | return result; |
234 | } | 228 | } |
235 | #endif | ||
236 | 229 | ||
237 | /* forward references */ | 230 | /* forward references */ |
238 | static void v4l_fbuffer_free(struct file *file); | 231 | static void v4l_fbuffer_free(struct file *file); |
@@ -1709,7 +1702,6 @@ setup_overlay (struct file *file, | |||
1709 | return wait_grab_pending(zr); | 1702 | return wait_grab_pending(zr); |
1710 | } | 1703 | } |
1711 | 1704 | ||
1712 | #ifdef CONFIG_VIDEO_V4L2 | ||
1713 | /* get the status of a buffer in the clients buffer queue */ | 1705 | /* get the status of a buffer in the clients buffer queue */ |
1714 | static int | 1706 | static int |
1715 | zoran_v4l2_buffer_status (struct file *file, | 1707 | zoran_v4l2_buffer_status (struct file *file, |
@@ -1815,7 +1807,6 @@ zoran_v4l2_buffer_status (struct file *file, | |||
1815 | 1807 | ||
1816 | return 0; | 1808 | return 0; |
1817 | } | 1809 | } |
1818 | #endif | ||
1819 | 1810 | ||
1820 | static int | 1811 | static int |
1821 | zoran_set_norm (struct zoran *zr, | 1812 | zoran_set_norm (struct zoran *zr, |
@@ -2624,8 +2615,6 @@ zoran_do_ioctl (struct inode *inode, | |||
2624 | } | 2615 | } |
2625 | break; | 2616 | break; |
2626 | 2617 | ||
2627 | #ifdef CONFIG_VIDEO_V4L2 | ||
2628 | |||
2629 | /* The new video4linux2 capture interface - much nicer than video4linux1, since | 2618 | /* The new video4linux2 capture interface - much nicer than video4linux1, since |
2630 | * it allows for integrating the JPEG capturing calls inside standard v4l2 | 2619 | * it allows for integrating the JPEG capturing calls inside standard v4l2 |
2631 | */ | 2620 | */ |
@@ -4197,7 +4186,6 @@ zoran_do_ioctl (struct inode *inode, | |||
4197 | return 0; | 4186 | return 0; |
4198 | } | 4187 | } |
4199 | break; | 4188 | break; |
4200 | #endif | ||
4201 | 4189 | ||
4202 | default: | 4190 | default: |
4203 | dprintk(1, KERN_DEBUG "%s: UNKNOWN ioctl cmd: 0x%x\n", | 4191 | dprintk(1, KERN_DEBUG "%s: UNKNOWN ioctl cmd: 0x%x\n", |
@@ -4657,9 +4645,7 @@ static const struct file_operations zoran_fops = { | |||
4657 | struct video_device zoran_template __devinitdata = { | 4645 | struct video_device zoran_template __devinitdata = { |
4658 | .name = ZORAN_NAME, | 4646 | .name = ZORAN_NAME, |
4659 | .type = ZORAN_VID_TYPE, | 4647 | .type = ZORAN_VID_TYPE, |
4660 | #ifdef CONFIG_VIDEO_V4L2 | ||
4661 | .type2 = ZORAN_V4L2_VID_FLAGS, | 4648 | .type2 = ZORAN_V4L2_VID_FLAGS, |
4662 | #endif | ||
4663 | .fops = &zoran_fops, | 4649 | .fops = &zoran_fops, |
4664 | .release = &zoran_vdev_release, | 4650 | .release = &zoran_vdev_release, |
4665 | .minor = -1 | 4651 | .minor = -1 |