aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/video
diff options
context:
space:
mode:
authorMauro Carvalho Chehab <mchehab@infradead.org>2008-04-15 17:11:50 -0400
committerMauro Carvalho Chehab <mchehab@infradead.org>2008-04-24 13:09:40 -0400
commit17de9a4e53567912735105e189535f5d83e74a81 (patch)
tree3ba441d22496b067f4d2dfe28884ee4ff9639675 /drivers/media/video
parent0b9c2b7a413c0e79254f17bbe095cee24885cd4b (diff)
V4L/DVB (7584): Fix build that occurs when CONFIG_VIDEO_PMS=y and VIDEO_V4L2_COMMON=m
This patch removes zoran checks for VIDEO_V4L2, since this API is always present, when V4L is selected. Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Diffstat (limited to 'drivers/media/video')
-rw-r--r--drivers/media/video/msp3400-driver.c4
-rw-r--r--drivers/media/video/tuner-core.c2
-rw-r--r--drivers/media/video/zoran.h16
-rw-r--r--drivers/media/video/zoran_driver.c18
4 files changed, 5 insertions, 35 deletions
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
370static int msp_mode_v4l2_to_v4l1(int rxsubchans, int audmode) 370static 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
276struct 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 */
289struct zoran_jpg_settings { 273struct 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
112const struct zoran_format zoran_formats[] = { 107const struct zoran_format zoran_formats[] = {
@@ -209,7 +204,6 @@ static int lock_norm; /* 0 = default 1 = Don't change TV standard (norm) */
209module_param(lock_norm, int, 0644); 204module_param(lock_norm, int, 0644);
210MODULE_PARM_DESC(lock_norm, "Prevent norm changes (1 = ignore, >1 = fail)"); 205MODULE_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 */
238static void v4l_fbuffer_free(struct file *file); 231static 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 */
1714static int 1706static int
1715zoran_v4l2_buffer_status (struct file *file, 1707zoran_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
1820static int 1811static int
1821zoran_set_norm (struct zoran *zr, 1812zoran_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 = {
4657struct video_device zoran_template __devinitdata = { 4645struct 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