V4L/DVB (4068): Removed all references to kernel stuff from videodev.h and videodev2.h
authorMauro Carvalho Chehab <mchehab@infradead.org>
Mon, 5 Jun 2006 13:26:32 +0000 (10:26 -0300)
committerMauro Carvalho Chehab <mchehab@infradead.org>
Sun, 25 Jun 2006 05:05:05 +0000 (02:05 -0300)
The videodev.h and videodev2.h describe the public API for V4L and V4L2.
It shouldn't have there any kernel-specific stuff. Those were moved to
v4l2-dev.h.
This patch removes some uneeded headers and include v4l2-common.h on all
V4L driver. This header includes device implementation of V4L2 API provided
on v4l2-dev.h as well as V4L2 internal ioctls that provides connections
between master driver and its i2c devices.

Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
48 files changed:
drivers/media/radio/miropcm20-radio.c
drivers/media/radio/radio-aimslab.c
drivers/media/radio/radio-aztech.c
drivers/media/radio/radio-cadet.c
drivers/media/radio/radio-gemtek-pci.c
drivers/media/radio/radio-gemtek.c
drivers/media/radio/radio-maestro.c
drivers/media/radio/radio-maxiradio.c
drivers/media/radio/radio-rtrack2.c
drivers/media/radio/radio-sf16fmi.c
drivers/media/radio/radio-sf16fmr2.c
drivers/media/radio/radio-terratec.c
drivers/media/radio/radio-trust.c
drivers/media/radio/radio-typhoon.c
drivers/media/radio/radio-zoltrix.c
drivers/media/video/arv.c
drivers/media/video/bt8xx/bttvp.h
drivers/media/video/bw-qcam.c
drivers/media/video/c-qcam.c
drivers/media/video/cpia.h
drivers/media/video/cpia2/cpia2.h
drivers/media/video/dsbr100.c
drivers/media/video/meye.c
drivers/media/video/ov511.h
drivers/media/video/planb.c
drivers/media/video/pms.c
drivers/media/video/pwc/pwc.h
drivers/media/video/saa5246a.c
drivers/media/video/saa5249.c
drivers/media/video/saa7110.c
drivers/media/video/se401.h
drivers/media/video/stradis.c
drivers/media/video/stv680.c
drivers/media/video/tda9875.c
drivers/media/video/tuner-3036.c
drivers/media/video/usbvideo/usbvideo.h
drivers/media/video/v4l1-compat.c
drivers/media/video/vino.c
drivers/media/video/vpx3220.c
drivers/media/video/w9966.c
drivers/media/video/zoran_card.c
drivers/media/video/zoran_driver.c
drivers/media/video/zoran_procfs.c
include/linux/videodev.h
include/linux/videodev2.h
include/media/ovcamchip.h
include/media/saa7146_vv.h
include/media/v4l2-dev.h

index 7765c6a..c4312fa 100644 (file)
@@ -22,6 +22,7 @@
 #include <linux/module.h>
 #include <linux/init.h>
 #include <linux/videodev.h>
+#include <media/v4l2-common.h>
 #include "oss/aci.h"
 #include "miropcm20-rds-core.h"
 
index 36119d7..df22a58 100644 (file)
@@ -34,6 +34,7 @@
 #include <asm/io.h>            /* outb, outb_p                 */
 #include <asm/uaccess.h>       /* copy to/from user            */
 #include <linux/videodev.h>    /* kernel radio structs         */
+#include <media/v4l2-common.h>
 #include <linux/config.h>      /* CONFIG_RADIO_RTRACK_PORT     */
 #include <asm/semaphore.h>     /* Lock for the I/O             */
 
index ca67624..95e6322 100644 (file)
@@ -31,6 +31,7 @@
 #include <asm/io.h>            /* outb, outb_p                 */
 #include <asm/uaccess.h>       /* copy to/from user            */
 #include <linux/videodev.h>    /* kernel radio structs         */
+#include <media/v4l2-common.h>
 #include <linux/config.h>      /* CONFIG_RADIO_AZTECH_PORT     */
 
 /* acceptable ports: 0x350 (JP3 shorted), 0x358 (JP3 open) */
index c048454..8641aec 100644 (file)
@@ -34,6 +34,7 @@
 #include <asm/io.h>            /* outb, outb_p                 */
 #include <asm/uaccess.h>       /* copy to/from user            */
 #include <linux/videodev.h>    /* kernel radio structs         */
+#include <media/v4l2-common.h>
 #include <linux/param.h>
 #include <linux/pnp.h>
 
index d5c3c4b..9f249e7 100644 (file)
@@ -44,6 +44,7 @@
 #include <linux/init.h>
 #include <linux/pci.h>
 #include <linux/videodev.h>
+#include <media/v4l2-common.h>
 #include <linux/errno.h>
 
 #include <asm/io.h>
index 77a1e12..162f37d 100644 (file)
@@ -22,6 +22,7 @@
 #include <asm/io.h>            /* outb, outb_p                 */
 #include <asm/uaccess.h>       /* copy to/from user            */
 #include <linux/videodev.h>    /* kernel radio structs         */
+#include <media/v4l2-common.h>
 #include <linux/config.h>      /* CONFIG_RADIO_GEMTEK_PORT     */
 #include <linux/spinlock.h>
 
index 2501792..fcfa6c9 100644 (file)
@@ -26,7 +26,7 @@
 #include <linux/mutex.h>
 #include <linux/pci.h>
 #include <linux/videodev.h>
-
+#include <media/v4l2-common.h>
 
 #define DRIVER_VERSION "0.05"
 
index fe25525..f93d7af 100644 (file)
@@ -41,6 +41,7 @@
 
 #include <linux/pci.h>
 #include <linux/videodev.h>
+#include <media/v4l2-common.h>
 
 /* version 0.75      Sun Feb  4 22:51:27 EET 2001 */
 #define DRIVER_VERSION "0.75"
index 3821d25..5b68ac4 100644 (file)
@@ -15,6 +15,7 @@
 #include <asm/io.h>            /* outb, outb_p                 */
 #include <asm/uaccess.h>       /* copy to/from user            */
 #include <linux/videodev.h>    /* kernel radio structs         */
+#include <media/v4l2-common.h>
 #include <linux/config.h>      /* CONFIG_RADIO_RTRACK2_PORT    */
 #include <linux/spinlock.h>
 
index 70cfbc3..efee6e3 100644 (file)
@@ -21,6 +21,7 @@
 #include <linux/ioport.h>      /* request_region               */
 #include <linux/delay.h>       /* udelay                       */
 #include <linux/videodev.h>    /* kernel radio structs         */
+#include <media/v4l2-common.h>
 #include <linux/isapnp.h>
 #include <asm/io.h>            /* outb, outb_p                 */
 #include <asm/uaccess.h>       /* copy to/from user            */
index ca560a4..3483b2c 100644 (file)
@@ -19,6 +19,7 @@
 #include <asm/io.h>            /* outb, outb_p                 */
 #include <asm/uaccess.h>       /* copy to/from user            */
 #include <linux/videodev.h>    /* kernel radio structs         */
+#include <media/v4l2-common.h>
 #include <linux/mutex.h>
 
 static struct mutex lock;
index 3ac0c36..dfba4ae 100644 (file)
@@ -30,6 +30,7 @@
 #include <asm/io.h>            /* outb, outb_p                 */
 #include <asm/uaccess.h>       /* copy to/from user            */
 #include <linux/videodev.h>    /* kernel radio structs         */
+#include <media/v4l2-common.h>
 #include <linux/config.h>      /* CONFIG_RADIO_TERRATEC_PORT   */
 #include <linux/spinlock.h>
 
index efcec01..8da4bad 100644 (file)
@@ -22,6 +22,7 @@
 #include <asm/io.h>
 #include <asm/uaccess.h>
 #include <linux/videodev.h>
+#include <media/v4l2-common.h>
 #include <linux/config.h>      /* CONFIG_RADIO_TRUST_PORT      */
 
 /* acceptable ports: 0x350 (JP3 shorted), 0x358 (JP3 open) */
index e424099..cf4fc08 100644 (file)
@@ -36,6 +36,7 @@
 #include <asm/io.h>            /* outb, outb_p                   */
 #include <asm/uaccess.h>       /* copy to/from user              */
 #include <linux/videodev.h>    /* kernel radio structs           */
+#include <media/v4l2-common.h>
 #include <linux/config.h>      /* CONFIG_RADIO_TYPHOON_*         */
 
 #define BANNER "Typhoon Radio Card driver v0.1\n"
index 8aceea0..59b86a6 100644 (file)
@@ -33,6 +33,7 @@
 #include <asm/io.h>            /* outb, outb_p                   */
 #include <asm/uaccess.h>       /* copy to/from user              */
 #include <linux/videodev.h>    /* kernel radio structs           */
+#include <media/v4l2-common.h>
 #include <linux/config.h>      /* CONFIG_RADIO_ZOLTRIX_PORT      */
 
 #ifndef CONFIG_RADIO_ZOLTRIX_PORT
index dbe0251..53824cc 100644 (file)
@@ -31,6 +31,7 @@
 #include <linux/mm.h>
 #include <linux/sched.h>
 #include <linux/videodev.h>
+#include <media/v4l2-common.h>
 #include <linux/mutex.h>
 
 #include <asm/uaccess.h>
index 4183a21..d295601 100644 (file)
@@ -33,6 +33,7 @@
 #include <linux/i2c.h>
 #include <linux/i2c-algo-bit.h>
 #include <linux/videodev.h>
+#include <media/v4l2-common.h>
 #include <linux/pci.h>
 #include <linux/input.h>
 #include <linux/mutex.h>
index cf61c59..709c07c 100644 (file)
@@ -73,6 +73,7 @@ OTHER DEALINGS IN THE SOFTWARE.
 #include <linux/parport.h>
 #include <linux/sched.h>
 #include <linux/videodev.h>
+#include <media/v4l2-common.h>
 #include <linux/mutex.h>
 #include <asm/uaccess.h>
 
index 22a7386..a3989bd 100644 (file)
@@ -34,6 +34,7 @@
 #include <linux/parport.h>
 #include <linux/sched.h>
 #include <linux/videodev.h>
+#include <media/v4l2-common.h>
 #include <linux/mutex.h>
 
 #include <asm/uaccess.h>
index 3dc88b7..6eaa692 100644 (file)
@@ -45,6 +45,7 @@
 
 #include <asm/uaccess.h>
 #include <linux/videodev.h>
+#include <media/v4l2-common.h>
 #include <linux/list.h>
 #include <linux/smp_lock.h>
 #include <linux/mutex.h>
index 1764991..c5ecb2b 100644 (file)
@@ -33,6 +33,7 @@
 
 #include <linux/version.h>
 #include <linux/videodev.h>
+#include <media/v4l2-common.h>
 #include <linux/usb.h>
 #include <linux/poll.h>
 
index 3b4e998..f7e33f9 100644 (file)
@@ -72,6 +72,7 @@
 #include <linux/slab.h>
 #include <linux/input.h>
 #include <linux/videodev.h>
+#include <media/v4l2-common.h>
 #include <linux/usb.h>
 #include <linux/smp_lock.h>
 
index 595a3ea..f68ca7d 100644 (file)
@@ -32,6 +32,7 @@
 #include <linux/sched.h>
 #include <linux/init.h>
 #include <linux/videodev.h>
+#include <media/v4l2-common.h>
 #include <asm/uaccess.h>
 #include <asm/io.h>
 #include <linux/delay.h>
index 12b3d51..68b082b 100644 (file)
@@ -3,6 +3,7 @@
 
 #include <asm/uaccess.h>
 #include <linux/videodev.h>
+#include <media/v4l2-common.h>
 #include <linux/smp_lock.h>
 #include <linux/usb.h>
 #include <linux/mutex.h>
index d9e3cad..3484e36 100644 (file)
@@ -40,6 +40,7 @@
 #include <linux/mm.h>
 #include <linux/sched.h>
 #include <linux/videodev.h>
+#include <media/v4l2-common.h>
 #include <linux/wait.h>
 #include <asm/uaccess.h>
 #include <asm/io.h>
index 09835ca..fb6471e 100644 (file)
@@ -30,6 +30,7 @@
 #include <asm/io.h>
 #include <linux/sched.h>
 #include <linux/videodev.h>
+#include <media/v4l2-common.h>
 #include <linux/mutex.h>
 
 #include <asm/uaccess.h>
index 1fd8c34..a087108 100644 (file)
@@ -35,7 +35,7 @@
 #include <asm/semaphore.h>
 #include <asm/errno.h>
 #include <linux/videodev.h>
-#include <linux/videodev2.h>
+#include <media/v4l2-common.h>
 
 #include "pwc-uncompress.h"
 #include <media/pwc-ioctl.h>
index dd830e0..59a1872 100644 (file)
@@ -46,6 +46,7 @@
 #include <linux/i2c.h>
 #include <linux/videotext.h>
 #include <linux/videodev.h>
+#include <media/v4l2-common.h>
 #include <linux/mutex.h>
 
 #include "saa5246a.h"
index 531e946..19a8d65 100644 (file)
@@ -56,6 +56,7 @@
 #include <linux/i2c.h>
 #include <linux/videotext.h>
 #include <linux/videodev.h>
+#include <media/v4l2-common.h>
 #include <linux/mutex.h>
 
 
index 41d951d..676b997 100644 (file)
@@ -43,6 +43,7 @@ MODULE_LICENSE("GPL");
 #define I2C_NAME(s) (s)->name
 
 #include <linux/videodev.h>
+#include <media/v4l2-common.h>
 #include <linux/video_decoder.h>
 
 static int debug = 0;
index a7a216b..c0891b3 100644 (file)
@@ -4,6 +4,7 @@
 
 #include <asm/uaccess.h>
 #include <linux/videodev.h>
+#include <media/v4l2-common.h>
 #include <linux/smp_lock.h>
 #include <linux/mutex.h>
 
index 07476c7..6be9c11 100644 (file)
@@ -42,6 +42,7 @@
 #include <asm/uaccess.h>
 #include <linux/vmalloc.h>
 #include <linux/videodev.h>
+#include <media/v4l2-common.h>
 
 #include "saa7146.h"
 #include "saa7146reg.h"
index b38bda8..351b182 100644 (file)
@@ -66,6 +66,7 @@
 #include <linux/pagemap.h>
 #include <linux/errno.h>
 #include <linux/videodev.h>
+#include <media/v4l2-common.h>
 #include <linux/usb.h>
 #include <linux/mutex.h>
 
index 103ccb9..5b6aa49 100644 (file)
@@ -26,6 +26,7 @@
 #include <linux/errno.h>
 #include <linux/slab.h>
 #include <linux/videodev.h>
+#include <media/v4l2-common.h>
 #include <linux/i2c.h>
 #include <linux/i2c-algo-bit.h>
 #include <linux/init.h>
index 74ab48c..bdf506e 100644 (file)
@@ -25,6 +25,7 @@
 
 #include <linux/i2c.h>
 #include <linux/videodev.h>
+#include <media/v4l2-common.h>
 
 #include <media/tuner.h>
 
index 3cbf4fc..49dbee5 100644 (file)
@@ -18,6 +18,7 @@
 
 #include <linux/config.h>
 #include <linux/videodev.h>
+#include <media/v4l2-common.h>
 #include <linux/usb.h>
 #include <linux/mutex.h>
 
index 474a29b..19d3c20 100644 (file)
@@ -32,6 +32,7 @@
 #include <linux/errno.h>
 #include <linux/slab.h>
 #include <linux/videodev.h>
+#include <media/v4l2-common.h>
 
 #include <asm/uaccess.h>
 #include <asm/system.h>
index a8c1014..268e69f 100644 (file)
@@ -40,7 +40,7 @@
 #include <linux/i2c-algo-sgi.h>
 
 #include <linux/videodev.h>
-#include <linux/videodev2.h>
+#include <media/v4l2-common.h>
 #include <linux/video_decoder.h>
 #include <linux/mutex.h>
 
index 40b205b..1eca7e6 100644 (file)
@@ -34,6 +34,7 @@
 #define I2C_NAME(x) (x)->name
 
 #include <linux/videodev.h>
+#include <media/v4l2-common.h>
 #include <linux/video_decoder.h>
 
 #define I2C_VPX3220        0x86
index 80ef8a1..4bdc886 100644 (file)
@@ -58,6 +58,7 @@
 #include <linux/init.h>
 #include <linux/delay.h>
 #include <linux/videodev.h>
+#include <media/v4l2-common.h>
 #include <linux/parport.h>
 
 //#define DEBUG                                // Undef me for production
index 7981385..958c1e6 100644 (file)
@@ -40,6 +40,7 @@
 #include <linux/i2c.h>
 #include <linux/i2c-algo-bit.h>
 #include <linux/videodev.h>
+#include <media/v4l2-common.h>
 #include <linux/spinlock.h>
 #include <linux/sem.h>
 #include <linux/kmod.h>
index b5a576a..fd05a7f 100644 (file)
@@ -73,6 +73,7 @@
                             )
 
 #include <linux/videodev.h>
+#include <media/v4l2-common.h>
 #include "videocodec.h"
 
 #include <asm/io.h>
index a00fae9..f4ffe79 100644 (file)
@@ -43,6 +43,7 @@
 #include <linux/seq_file.h>
 
 #include <linux/ctype.h>
+#include <linux/poll.h>
 #include <asm/io.h>
 
 #include "videocodec.h"
index 5b62055..41bc7e9 100644 (file)
 #ifndef __LINUX_VIDEODEV_H
 #define __LINUX_VIDEODEV_H
 
-#include <linux/types.h>
-#include <linux/poll.h>
-#include <linux/fs.h>
-#include <linux/device.h>
-#include <linux/mutex.h>
-#include <linux/compiler.h> /* need __user */
-
 #define HAVE_V4L1 1
 
 #include <linux/videodev2.h>
@@ -343,10 +336,6 @@ struct video_code
 #define VID_HARDWARE_SN9C102   38
 #define VID_HARDWARE_ARV       39
 
-#ifdef __KERNEL__
-#include <media/v4l2-dev.h>
-#endif /* __KERNEL__ */
-
 #endif /* __LINUX_VIDEODEV_H */
 
 /*
index bb58197..795831d 100644 (file)
@@ -24,7 +24,6 @@
  * Common stuff for both V4L1 and V4L2
  * Moved from videodev.h
  */
-
 #define VIDEO_MAX_FRAME               32
 
 #define VID_TYPE_CAPTURE       1       /* Can capture */
@@ -200,7 +199,6 @@ struct v4l2_capability
 /*
  *     V I D E O   I M A G E   F O R M A T
  */
-
 struct v4l2_pix_format
 {
        __u32                   width;
@@ -213,7 +211,7 @@ struct v4l2_pix_format
        __u32                   priv;           /* private data, depends on pixelformat */
 };
 
-/*           Pixel format    FOURCC                  depth  Description   */
+/*      Pixel format         FOURCC                        depth  Description  */
 #define V4L2_PIX_FMT_RGB332  v4l2_fourcc('R','G','B','1') /*  8  RGB-3-3-2     */
 #define V4L2_PIX_FMT_RGB555  v4l2_fourcc('R','G','B','O') /* 16  RGB-5-5-5     */
 #define V4L2_PIX_FMT_RGB565  v4l2_fourcc('R','G','B','P') /* 16  RGB-5-6-5     */
@@ -273,7 +271,6 @@ struct v4l2_fmtdesc
 
 #define V4L2_FMT_FLAG_COMPRESSED 0x0001
 
-
 /*
  *     T I M E C O D E
  */
@@ -303,7 +300,6 @@ struct v4l2_timecode
 #define V4L2_TC_USERBITS_8BITCHARS     0x0008
 /* The above is based on SMPTE timecodes */
 
-
 /*
  *     M P E G   C O M P R E S S I O N   P A R A M E T E R S
  *
@@ -311,8 +307,6 @@ struct v4l2_timecode
  *  ###          there will be some incompatible changes.
  *
  */
-
-
 enum v4l2_bitrate_mode {
        V4L2_BITRATE_NONE = 0,  /* not specified */
        V4L2_BITRATE_CBR,       /* constant bitrate */
@@ -421,7 +415,6 @@ struct v4l2_jpegcompression
                                        * allways use APP0 */
 };
 
-
 /*
  *     M E M O R Y - M A P P I N G   B U F F E R S
  */
@@ -503,7 +496,6 @@ struct v4l2_window
        void                    __user *bitmap;
 };
 
-
 /*
  *     C A P T U R E   P A R A M E T E R S
  */
@@ -516,6 +508,7 @@ struct v4l2_captureparm
        __u32              readbuffers;   /*  # of buffers for read */
        __u32              reserved[4];
 };
+
 /*  Flags for 'capability' and 'capturemode' fields */
 #define V4L2_MODE_HIGHQUALITY  0x0001  /*  High quality imaging mode */
 #define V4L2_CAP_TIMEPERFRAME  0x1000  /*  timeperframe field is supported */
@@ -533,7 +526,6 @@ struct v4l2_outputparm
 /*
  *     I N P U T   I M A G E   C R O P P I N G
  */
-
 struct v4l2_cropcap {
        enum v4l2_buf_type      type;
        struct v4l2_rect        bounds;
@@ -640,7 +632,6 @@ struct v4l2_standard
        __u32                reserved[4];
 };
 
-
 /*
  *     V I D E O   I N P U T S
  */
@@ -655,6 +646,7 @@ struct v4l2_input
        __u32        status;
        __u32        reserved[4];
 };
+
 /*  Values for the 'type' field */
 #define V4L2_INPUT_TYPE_TUNER          1
 #define V4L2_INPUT_TYPE_CAMERA         2
@@ -834,6 +826,7 @@ struct v4l2_audio
        __u32   mode;
        __u32   reserved[2];
 };
+
 /*  Flags for the 'capability' field */
 #define V4L2_AUDCAP_STEREO             0x00001
 #define V4L2_AUDCAP_AVL                        0x00002
@@ -857,7 +850,6 @@ struct v4l2_audioout
  */
 
 /* Raw VBI */
-
 struct v4l2_vbi_format
 {
        __u32   sampling_rate;          /* in 1 Hz */
@@ -964,8 +956,6 @@ struct v4l2_streamparm
        } parm;
 };
 
-
-
 /*
  *     I O C T L   C O D E S   F O R   V I D E O   D E V I C E S
  *
index 8138983..0f43451 100644 (file)
@@ -15,6 +15,7 @@
 #define __LINUX_OVCAMCHIP_H
 
 #include <linux/videodev.h>
+#include <media/v4l2-common.h>
 #include <linux/i2c.h>
 
 /* --------------------------------- */
index 4507cb6..83fe2e3 100644 (file)
@@ -2,7 +2,7 @@
 #define __SAA7146_VV__
 
 #include <linux/videodev.h>
-
+#include <media/v4l2-common.h>
 #include <media/saa7146.h>
 #include <media/video-buf.h>
 
index c2f54d2..dec6b24 100644 (file)
@@ -40,8 +40,6 @@
 #define VFL_TYPE_RADIO         2
 #define VFL_TYPE_VTX           3
 
-       const struct file_operations *fops;
-
 /*  Video standard functions  */
 extern unsigned int v4l2_video_std_fps(struct v4l2_standard *vs);
 extern int v4l2_video_std_construct(struct v4l2_standard *vs,
@@ -92,7 +90,7 @@ struct v4l2_tvnorm {
 struct video_device
 {
        /* device ops */
-       struct file_operations *fops;
+       const struct file_operations *fops;
 
        /* device info */
        struct device *dev;
@@ -297,7 +295,7 @@ struct video_device
        int (*vidioc_log_status)       (struct file *file, void *fh);
 
 
-#if OBSOLETE_OWNER /* to be removed soon */
+#ifdef OBSOLETE_OWNER /* to be removed soon */
 /* obsolete -- fops->owner is used instead */
 struct module *owner;
 /* dev->driver_data will be used instead some day.
@@ -351,7 +349,7 @@ video_device_remove_file(struct video_device *vfd,
        class_device_remove_file(&vfd->class_dev, attr);
 }
 
-#if OBSOLETE_OWNER /* to be removed soon */
+#ifdef OBSOLETE_OWNER /* to be removed soon */
 /* helper functions to access driver private data. */
 static inline void *video_get_drvdata(struct video_device *dev)
 {