V4L/DVB: zoran: remove V4L1 videodev.h include
authorHans Verkuil <hverkuil@xs4all.nl>
Mon, 22 Mar 2010 08:25:46 +0000 (05:25 -0300)
committerMauro Carvalho Chehab <mchehab@redhat.com>
Tue, 18 May 2010 03:52:41 +0000 (00:52 -0300)
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
drivers/media/video/zoran/zoran.h
drivers/media/video/zoran/zoran_driver.c

index cb1de7e..8997add 100644 (file)
 
 #include <media/v4l2-device.h>
 
+#define ZORAN_VIDMODE_PAL      0
+#define ZORAN_VIDMODE_NTSC     1
+#define ZORAN_VIDMODE_SECAM    2
+
 struct zoran_requestbuffers {
        unsigned long count;    /* Number of buffers for MJPEG grabbing */
        unsigned long size;     /* Size PER BUFFER in bytes */
@@ -48,7 +52,7 @@ struct zoran_sync {
 struct zoran_status {
        int input;              /* Input channel, has to be set prior to BUZIOC_G_STATUS */
        int signal;             /* Returned: 1 if valid video signal detected */
-       int norm;               /* Returned: VIDEO_MODE_PAL or VIDEO_MODE_NTSC */
+       int norm;               /* Returned: ZORAN_VIDMODE_PAL or ZORAN_VIDMODE_NTSC */
        int color;              /* Returned: 1 if color signal detected */
 };
 
@@ -62,7 +66,7 @@ struct zoran_params {
        /* Main control parameters */
 
        int input;              /* Input channel: 0 = Composite, 1 = S-VHS */
-       int norm;               /* Norm: VIDEO_MODE_PAL or VIDEO_MODE_NTSC */
+       int norm;               /* Norm: ZORAN_VIDMODE_PAL or ZORAN_VIDMODE_NTSC */
        int decimation;         /* decimation of captured video,
                                 * enlargement of video played back.
                                 * Valid values are 1, 2, 4 or 0.
@@ -131,13 +135,13 @@ struct zoran_params {
 /*
 Private IOCTL to set up for displaying MJPEG
 */
-#define BUZIOC_G_PARAMS       _IOR ('v', BASE_VIDIOCPRIVATE+0,  struct zoran_params)
-#define BUZIOC_S_PARAMS       _IOWR('v', BASE_VIDIOCPRIVATE+1,  struct zoran_params)
-#define BUZIOC_REQBUFS        _IOWR('v', BASE_VIDIOCPRIVATE+2,  struct zoran_requestbuffers)
-#define BUZIOC_QBUF_CAPT      _IOW ('v', BASE_VIDIOCPRIVATE+3,  int)
-#define BUZIOC_QBUF_PLAY      _IOW ('v', BASE_VIDIOCPRIVATE+4,  int)
-#define BUZIOC_SYNC           _IOR ('v', BASE_VIDIOCPRIVATE+5,  struct zoran_sync)
-#define BUZIOC_G_STATUS       _IOWR('v', BASE_VIDIOCPRIVATE+6,  struct zoran_status)
+#define BUZIOC_G_PARAMS       _IOR ('v', BASE_VIDIOC_PRIVATE+0,  struct zoran_params)
+#define BUZIOC_S_PARAMS       _IOWR('v', BASE_VIDIOC_PRIVATE+1,  struct zoran_params)
+#define BUZIOC_REQBUFS        _IOWR('v', BASE_VIDIOC_PRIVATE+2,  struct zoran_requestbuffers)
+#define BUZIOC_QBUF_CAPT      _IOW ('v', BASE_VIDIOC_PRIVATE+3,  int)
+#define BUZIOC_QBUF_PLAY      _IOW ('v', BASE_VIDIOC_PRIVATE+4,  int)
+#define BUZIOC_SYNC           _IOR ('v', BASE_VIDIOC_PRIVATE+5,  struct zoran_sync)
+#define BUZIOC_G_STATUS       _IOWR('v', BASE_VIDIOC_PRIVATE+6,  struct zoran_status)
 
 
 #ifdef __KERNEL__
@@ -401,7 +405,7 @@ struct zoran {
        spinlock_t spinlock;    /* Spinlock */
 
        /* Video for Linux parameters */
-       int input;      /* card's norm and input - norm=VIDEO_MODE_* */
+       int input;      /* card's norm and input */
        v4l2_std_id norm;
 
        /* Current buffer params */
index ec41303..6f89d0a 100644 (file)
@@ -60,7 +60,7 @@
 
 #include <linux/spinlock.h>
 
-#include <linux/videodev.h>
+#include <linux/videodev2.h>
 #include <media/v4l2-common.h>
 #include <media/v4l2-ioctl.h>
 #include "videocodec.h"
@@ -1549,11 +1549,11 @@ static long zoran_default(struct file *file, void *__fh, int cmd, void *arg)
                mutex_lock(&zr->resource_lock);
 
                if (zr->norm & V4L2_STD_NTSC)
-                       bparams->norm = VIDEO_MODE_NTSC;
-               else if (zr->norm & V4L2_STD_PAL)
-                       bparams->norm = VIDEO_MODE_PAL;
+                       bparams->norm = ZORAN_VIDMODE_NTSC;
+               else if (zr->norm & V4L2_STD_SECAM)
+                       bparams->norm = ZORAN_VIDMODE_SECAM;
                else
-                       bparams->norm = VIDEO_MODE_SECAM;
+                       bparams->norm = ZORAN_VIDMODE_PAL;
 
                bparams->input = zr->input;
 
@@ -1789,11 +1789,11 @@ gstat_unlock_and_return:
                        bstat->signal =
                            (status & V4L2_IN_ST_NO_SIGNAL) ? 0 : 1;
                        if (norm & V4L2_STD_NTSC)
-                               bstat->norm = VIDEO_MODE_NTSC;
+                               bstat->norm = ZORAN_VIDMODE_NTSC;
                        else if (norm & V4L2_STD_SECAM)
-                               bstat->norm = VIDEO_MODE_SECAM;
+                               bstat->norm = ZORAN_VIDMODE_SECAM;
                        else
-                               bstat->norm = VIDEO_MODE_PAL;
+                               bstat->norm = ZORAN_VIDMODE_PAL;
 
                        bstat->color =
                            (status & V4L2_IN_ST_NO_COLOR) ? 0 : 1;