Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

V4L/DVB (4068): Removed all references to kernel stuff from videodev.h and videodev2.h

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>

+52 -34
+1
drivers/media/radio/miropcm20-radio.c
··· 22 22 #include <linux/module.h> 23 23 #include <linux/init.h> 24 24 #include <linux/videodev.h> 25 + #include <media/v4l2-common.h> 25 26 #include "oss/aci.h" 26 27 #include "miropcm20-rds-core.h" 27 28
+1
drivers/media/radio/radio-aimslab.c
··· 34 34 #include <asm/io.h> /* outb, outb_p */ 35 35 #include <asm/uaccess.h> /* copy to/from user */ 36 36 #include <linux/videodev.h> /* kernel radio structs */ 37 + #include <media/v4l2-common.h> 37 38 #include <linux/config.h> /* CONFIG_RADIO_RTRACK_PORT */ 38 39 #include <asm/semaphore.h> /* Lock for the I/O */ 39 40
+1
drivers/media/radio/radio-aztech.c
··· 31 31 #include <asm/io.h> /* outb, outb_p */ 32 32 #include <asm/uaccess.h> /* copy to/from user */ 33 33 #include <linux/videodev.h> /* kernel radio structs */ 34 + #include <media/v4l2-common.h> 34 35 #include <linux/config.h> /* CONFIG_RADIO_AZTECH_PORT */ 35 36 36 37 /* acceptable ports: 0x350 (JP3 shorted), 0x358 (JP3 open) */
+1
drivers/media/radio/radio-cadet.c
··· 34 34 #include <asm/io.h> /* outb, outb_p */ 35 35 #include <asm/uaccess.h> /* copy to/from user */ 36 36 #include <linux/videodev.h> /* kernel radio structs */ 37 + #include <media/v4l2-common.h> 37 38 #include <linux/param.h> 38 39 #include <linux/pnp.h> 39 40
+1
drivers/media/radio/radio-gemtek-pci.c
··· 44 44 #include <linux/init.h> 45 45 #include <linux/pci.h> 46 46 #include <linux/videodev.h> 47 + #include <media/v4l2-common.h> 47 48 #include <linux/errno.h> 48 49 49 50 #include <asm/io.h>
+1
drivers/media/radio/radio-gemtek.c
··· 22 22 #include <asm/io.h> /* outb, outb_p */ 23 23 #include <asm/uaccess.h> /* copy to/from user */ 24 24 #include <linux/videodev.h> /* kernel radio structs */ 25 + #include <media/v4l2-common.h> 25 26 #include <linux/config.h> /* CONFIG_RADIO_GEMTEK_PORT */ 26 27 #include <linux/spinlock.h> 27 28
+1 -1
drivers/media/radio/radio-maestro.c
··· 26 26 #include <linux/mutex.h> 27 27 #include <linux/pci.h> 28 28 #include <linux/videodev.h> 29 - 29 + #include <media/v4l2-common.h> 30 30 31 31 #define DRIVER_VERSION "0.05" 32 32
+1
drivers/media/radio/radio-maxiradio.c
··· 41 41 42 42 #include <linux/pci.h> 43 43 #include <linux/videodev.h> 44 + #include <media/v4l2-common.h> 44 45 45 46 /* version 0.75 Sun Feb 4 22:51:27 EET 2001 */ 46 47 #define DRIVER_VERSION "0.75"
+1
drivers/media/radio/radio-rtrack2.c
··· 15 15 #include <asm/io.h> /* outb, outb_p */ 16 16 #include <asm/uaccess.h> /* copy to/from user */ 17 17 #include <linux/videodev.h> /* kernel radio structs */ 18 + #include <media/v4l2-common.h> 18 19 #include <linux/config.h> /* CONFIG_RADIO_RTRACK2_PORT */ 19 20 #include <linux/spinlock.h> 20 21
+1
drivers/media/radio/radio-sf16fmi.c
··· 21 21 #include <linux/ioport.h> /* request_region */ 22 22 #include <linux/delay.h> /* udelay */ 23 23 #include <linux/videodev.h> /* kernel radio structs */ 24 + #include <media/v4l2-common.h> 24 25 #include <linux/isapnp.h> 25 26 #include <asm/io.h> /* outb, outb_p */ 26 27 #include <asm/uaccess.h> /* copy to/from user */
+1
drivers/media/radio/radio-sf16fmr2.c
··· 19 19 #include <asm/io.h> /* outb, outb_p */ 20 20 #include <asm/uaccess.h> /* copy to/from user */ 21 21 #include <linux/videodev.h> /* kernel radio structs */ 22 + #include <media/v4l2-common.h> 22 23 #include <linux/mutex.h> 23 24 24 25 static struct mutex lock;
+1
drivers/media/radio/radio-terratec.c
··· 30 30 #include <asm/io.h> /* outb, outb_p */ 31 31 #include <asm/uaccess.h> /* copy to/from user */ 32 32 #include <linux/videodev.h> /* kernel radio structs */ 33 + #include <media/v4l2-common.h> 33 34 #include <linux/config.h> /* CONFIG_RADIO_TERRATEC_PORT */ 34 35 #include <linux/spinlock.h> 35 36
+1
drivers/media/radio/radio-trust.c
··· 22 22 #include <asm/io.h> 23 23 #include <asm/uaccess.h> 24 24 #include <linux/videodev.h> 25 + #include <media/v4l2-common.h> 25 26 #include <linux/config.h> /* CONFIG_RADIO_TRUST_PORT */ 26 27 27 28 /* acceptable ports: 0x350 (JP3 shorted), 0x358 (JP3 open) */
+1
drivers/media/radio/radio-typhoon.c
··· 36 36 #include <asm/io.h> /* outb, outb_p */ 37 37 #include <asm/uaccess.h> /* copy to/from user */ 38 38 #include <linux/videodev.h> /* kernel radio structs */ 39 + #include <media/v4l2-common.h> 39 40 #include <linux/config.h> /* CONFIG_RADIO_TYPHOON_* */ 40 41 41 42 #define BANNER "Typhoon Radio Card driver v0.1\n"
+1
drivers/media/radio/radio-zoltrix.c
··· 33 33 #include <asm/io.h> /* outb, outb_p */ 34 34 #include <asm/uaccess.h> /* copy to/from user */ 35 35 #include <linux/videodev.h> /* kernel radio structs */ 36 + #include <media/v4l2-common.h> 36 37 #include <linux/config.h> /* CONFIG_RADIO_ZOLTRIX_PORT */ 37 38 38 39 #ifndef CONFIG_RADIO_ZOLTRIX_PORT
+1
drivers/media/video/arv.c
··· 31 31 #include <linux/mm.h> 32 32 #include <linux/sched.h> 33 33 #include <linux/videodev.h> 34 + #include <media/v4l2-common.h> 34 35 #include <linux/mutex.h> 35 36 36 37 #include <asm/uaccess.h>
+1
drivers/media/video/bt8xx/bttvp.h
··· 33 33 #include <linux/i2c.h> 34 34 #include <linux/i2c-algo-bit.h> 35 35 #include <linux/videodev.h> 36 + #include <media/v4l2-common.h> 36 37 #include <linux/pci.h> 37 38 #include <linux/input.h> 38 39 #include <linux/mutex.h>
+1
drivers/media/video/bw-qcam.c
··· 73 73 #include <linux/parport.h> 74 74 #include <linux/sched.h> 75 75 #include <linux/videodev.h> 76 + #include <media/v4l2-common.h> 76 77 #include <linux/mutex.h> 77 78 #include <asm/uaccess.h> 78 79
+1
drivers/media/video/c-qcam.c
··· 34 34 #include <linux/parport.h> 35 35 #include <linux/sched.h> 36 36 #include <linux/videodev.h> 37 + #include <media/v4l2-common.h> 37 38 #include <linux/mutex.h> 38 39 39 40 #include <asm/uaccess.h>
+1
drivers/media/video/cpia.h
··· 45 45 46 46 #include <asm/uaccess.h> 47 47 #include <linux/videodev.h> 48 + #include <media/v4l2-common.h> 48 49 #include <linux/list.h> 49 50 #include <linux/smp_lock.h> 50 51 #include <linux/mutex.h>
+1
drivers/media/video/cpia2/cpia2.h
··· 33 33 34 34 #include <linux/version.h> 35 35 #include <linux/videodev.h> 36 + #include <media/v4l2-common.h> 36 37 #include <linux/usb.h> 37 38 #include <linux/poll.h> 38 39
+1
drivers/media/video/dsbr100.c
··· 72 72 #include <linux/slab.h> 73 73 #include <linux/input.h> 74 74 #include <linux/videodev.h> 75 + #include <media/v4l2-common.h> 75 76 #include <linux/usb.h> 76 77 #include <linux/smp_lock.h> 77 78
+1
drivers/media/video/meye.c
··· 32 32 #include <linux/sched.h> 33 33 #include <linux/init.h> 34 34 #include <linux/videodev.h> 35 + #include <media/v4l2-common.h> 35 36 #include <asm/uaccess.h> 36 37 #include <asm/io.h> 37 38 #include <linux/delay.h>
+1
drivers/media/video/ov511.h
··· 3 3 4 4 #include <asm/uaccess.h> 5 5 #include <linux/videodev.h> 6 + #include <media/v4l2-common.h> 6 7 #include <linux/smp_lock.h> 7 8 #include <linux/usb.h> 8 9 #include <linux/mutex.h>
+1
drivers/media/video/planb.c
··· 40 40 #include <linux/mm.h> 41 41 #include <linux/sched.h> 42 42 #include <linux/videodev.h> 43 + #include <media/v4l2-common.h> 43 44 #include <linux/wait.h> 44 45 #include <asm/uaccess.h> 45 46 #include <asm/io.h>
+1
drivers/media/video/pms.c
··· 30 30 #include <asm/io.h> 31 31 #include <linux/sched.h> 32 32 #include <linux/videodev.h> 33 + #include <media/v4l2-common.h> 33 34 #include <linux/mutex.h> 34 35 35 36 #include <asm/uaccess.h>
+1 -1
drivers/media/video/pwc/pwc.h
··· 35 35 #include <asm/semaphore.h> 36 36 #include <asm/errno.h> 37 37 #include <linux/videodev.h> 38 - #include <linux/videodev2.h> 38 + #include <media/v4l2-common.h> 39 39 40 40 #include "pwc-uncompress.h" 41 41 #include <media/pwc-ioctl.h>
+1
drivers/media/video/saa5246a.c
··· 46 46 #include <linux/i2c.h> 47 47 #include <linux/videotext.h> 48 48 #include <linux/videodev.h> 49 + #include <media/v4l2-common.h> 49 50 #include <linux/mutex.h> 50 51 51 52 #include "saa5246a.h"
+1
drivers/media/video/saa5249.c
··· 56 56 #include <linux/i2c.h> 57 57 #include <linux/videotext.h> 58 58 #include <linux/videodev.h> 59 + #include <media/v4l2-common.h> 59 60 #include <linux/mutex.h> 60 61 61 62
+1
drivers/media/video/saa7110.c
··· 43 43 #define I2C_NAME(s) (s)->name 44 44 45 45 #include <linux/videodev.h> 46 + #include <media/v4l2-common.h> 46 47 #include <linux/video_decoder.h> 47 48 48 49 static int debug = 0;
+1
drivers/media/video/se401.h
··· 4 4 5 5 #include <asm/uaccess.h> 6 6 #include <linux/videodev.h> 7 + #include <media/v4l2-common.h> 7 8 #include <linux/smp_lock.h> 8 9 #include <linux/mutex.h> 9 10
+1
drivers/media/video/stradis.c
··· 42 42 #include <asm/uaccess.h> 43 43 #include <linux/vmalloc.h> 44 44 #include <linux/videodev.h> 45 + #include <media/v4l2-common.h> 45 46 46 47 #include "saa7146.h" 47 48 #include "saa7146reg.h"
+1
drivers/media/video/stv680.c
··· 66 66 #include <linux/pagemap.h> 67 67 #include <linux/errno.h> 68 68 #include <linux/videodev.h> 69 + #include <media/v4l2-common.h> 69 70 #include <linux/usb.h> 70 71 #include <linux/mutex.h> 71 72
+1
drivers/media/video/tda9875.c
··· 26 26 #include <linux/errno.h> 27 27 #include <linux/slab.h> 28 28 #include <linux/videodev.h> 29 + #include <media/v4l2-common.h> 29 30 #include <linux/i2c.h> 30 31 #include <linux/i2c-algo-bit.h> 31 32 #include <linux/init.h>
+1
drivers/media/video/tuner-3036.c
··· 25 25 26 26 #include <linux/i2c.h> 27 27 #include <linux/videodev.h> 28 + #include <media/v4l2-common.h> 28 29 29 30 #include <media/tuner.h> 30 31
+1
drivers/media/video/usbvideo/usbvideo.h
··· 18 18 19 19 #include <linux/config.h> 20 20 #include <linux/videodev.h> 21 + #include <media/v4l2-common.h> 21 22 #include <linux/usb.h> 22 23 #include <linux/mutex.h> 23 24
+1
drivers/media/video/v4l1-compat.c
··· 32 32 #include <linux/errno.h> 33 33 #include <linux/slab.h> 34 34 #include <linux/videodev.h> 35 + #include <media/v4l2-common.h> 35 36 36 37 #include <asm/uaccess.h> 37 38 #include <asm/system.h>
+1 -1
drivers/media/video/vino.c
··· 40 40 #include <linux/i2c-algo-sgi.h> 41 41 42 42 #include <linux/videodev.h> 43 - #include <linux/videodev2.h> 43 + #include <media/v4l2-common.h> 44 44 #include <linux/video_decoder.h> 45 45 #include <linux/mutex.h> 46 46
+1
drivers/media/video/vpx3220.c
··· 34 34 #define I2C_NAME(x) (x)->name 35 35 36 36 #include <linux/videodev.h> 37 + #include <media/v4l2-common.h> 37 38 #include <linux/video_decoder.h> 38 39 39 40 #define I2C_VPX3220 0x86
+1
drivers/media/video/w9966.c
··· 58 58 #include <linux/init.h> 59 59 #include <linux/delay.h> 60 60 #include <linux/videodev.h> 61 + #include <media/v4l2-common.h> 61 62 #include <linux/parport.h> 62 63 63 64 //#define DEBUG // Undef me for production
+1
drivers/media/video/zoran_card.c
··· 40 40 #include <linux/i2c.h> 41 41 #include <linux/i2c-algo-bit.h> 42 42 #include <linux/videodev.h> 43 + #include <media/v4l2-common.h> 43 44 #include <linux/spinlock.h> 44 45 #include <linux/sem.h> 45 46 #include <linux/kmod.h>
+1
drivers/media/video/zoran_driver.c
··· 73 73 ) 74 74 75 75 #include <linux/videodev.h> 76 + #include <media/v4l2-common.h> 76 77 #include "videocodec.h" 77 78 78 79 #include <asm/io.h>
+1
drivers/media/video/zoran_procfs.c
··· 43 43 #include <linux/seq_file.h> 44 44 45 45 #include <linux/ctype.h> 46 + #include <linux/poll.h> 46 47 #include <asm/io.h> 47 48 48 49 #include "videocodec.h"
-11
include/linux/videodev.h
··· 12 12 #ifndef __LINUX_VIDEODEV_H 13 13 #define __LINUX_VIDEODEV_H 14 14 15 - #include <linux/types.h> 16 - #include <linux/poll.h> 17 - #include <linux/fs.h> 18 - #include <linux/device.h> 19 - #include <linux/mutex.h> 20 - #include <linux/compiler.h> /* need __user */ 21 - 22 15 #define HAVE_V4L1 1 23 16 24 17 #include <linux/videodev2.h> ··· 335 342 #define VID_HARDWARE_SAA7114H 37 336 343 #define VID_HARDWARE_SN9C102 38 337 344 #define VID_HARDWARE_ARV 39 338 - 339 - #ifdef __KERNEL__ 340 - #include <media/v4l2-dev.h> 341 - #endif /* __KERNEL__ */ 342 345 343 346 #endif /* __LINUX_VIDEODEV_H */ 344 347
+4 -14
include/linux/videodev2.h
··· 24 24 * Common stuff for both V4L1 and V4L2 25 25 * Moved from videodev.h 26 26 */ 27 - 28 27 #define VIDEO_MAX_FRAME 32 29 28 30 29 #define VID_TYPE_CAPTURE 1 /* Can capture */ ··· 199 200 /* 200 201 * V I D E O I M A G E F O R M A T 201 202 */ 202 - 203 203 struct v4l2_pix_format 204 204 { 205 205 __u32 width; ··· 211 213 __u32 priv; /* private data, depends on pixelformat */ 212 214 }; 213 215 214 - /* Pixel format FOURCC depth Description */ 216 + /* Pixel format FOURCC depth Description */ 215 217 #define V4L2_PIX_FMT_RGB332 v4l2_fourcc('R','G','B','1') /* 8 RGB-3-3-2 */ 216 218 #define V4L2_PIX_FMT_RGB555 v4l2_fourcc('R','G','B','O') /* 16 RGB-5-5-5 */ 217 219 #define V4L2_PIX_FMT_RGB565 v4l2_fourcc('R','G','B','P') /* 16 RGB-5-6-5 */ ··· 271 273 272 274 #define V4L2_FMT_FLAG_COMPRESSED 0x0001 273 275 274 - 275 276 /* 276 277 * T I M E C O D E 277 278 */ ··· 300 303 #define V4L2_TC_USERBITS_8BITCHARS 0x0008 301 304 /* The above is based on SMPTE timecodes */ 302 305 303 - 304 306 /* 305 307 * 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 306 308 * ··· 307 311 * ### there will be some incompatible changes. 308 312 * 309 313 */ 310 - 311 - 312 314 enum v4l2_bitrate_mode { 313 315 V4L2_BITRATE_NONE = 0, /* not specified */ 314 316 V4L2_BITRATE_CBR, /* constant bitrate */ ··· 415 421 * allways use APP0 */ 416 422 }; 417 423 418 - 419 424 /* 420 425 * M E M O R Y - M A P P I N G B U F F E R S 421 426 */ ··· 496 503 void __user *bitmap; 497 504 }; 498 505 499 - 500 506 /* 501 507 * C A P T U R E P A R A M E T E R S 502 508 */ ··· 508 516 __u32 readbuffers; /* # of buffers for read */ 509 517 __u32 reserved[4]; 510 518 }; 519 + 511 520 /* Flags for 'capability' and 'capturemode' fields */ 512 521 #define V4L2_MODE_HIGHQUALITY 0x0001 /* High quality imaging mode */ 513 522 #define V4L2_CAP_TIMEPERFRAME 0x1000 /* timeperframe field is supported */ ··· 526 533 /* 527 534 * I N P U T I M A G E C R O P P I N G 528 535 */ 529 - 530 536 struct v4l2_cropcap { 531 537 enum v4l2_buf_type type; 532 538 struct v4l2_rect bounds; ··· 632 640 __u32 reserved[4]; 633 641 }; 634 642 635 - 636 643 /* 637 644 * V I D E O I N P U T S 638 645 */ ··· 646 655 __u32 status; 647 656 __u32 reserved[4]; 648 657 }; 658 + 649 659 /* Values for the 'type' field */ 650 660 #define V4L2_INPUT_TYPE_TUNER 1 651 661 #define V4L2_INPUT_TYPE_CAMERA 2 ··· 826 834 __u32 mode; 827 835 __u32 reserved[2]; 828 836 }; 837 + 829 838 /* Flags for the 'capability' field */ 830 839 #define V4L2_AUDCAP_STEREO 0x00001 831 840 #define V4L2_AUDCAP_AVL 0x00002 ··· 850 857 */ 851 858 852 859 /* Raw VBI */ 853 - 854 860 struct v4l2_vbi_format 855 861 { 856 862 __u32 sampling_rate; /* in 1 Hz */ ··· 955 963 __u8 raw_data[200]; /* user-defined */ 956 964 } parm; 957 965 }; 958 - 959 - 960 966 961 967 /* 962 968 * 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
+1
include/media/ovcamchip.h
··· 15 15 #define __LINUX_OVCAMCHIP_H 16 16 17 17 #include <linux/videodev.h> 18 + #include <media/v4l2-common.h> 18 19 #include <linux/i2c.h> 19 20 20 21 /* --------------------------------- */
+1 -1
include/media/saa7146_vv.h
··· 2 2 #define __SAA7146_VV__ 3 3 4 4 #include <linux/videodev.h> 5 - 5 + #include <media/v4l2-common.h> 6 6 #include <media/saa7146.h> 7 7 #include <media/video-buf.h> 8 8
+3 -5
include/media/v4l2-dev.h
··· 40 40 #define VFL_TYPE_RADIO 2 41 41 #define VFL_TYPE_VTX 3 42 42 43 - const struct file_operations *fops; 44 - 45 43 /* Video standard functions */ 46 44 extern unsigned int v4l2_video_std_fps(struct v4l2_standard *vs); 47 45 extern int v4l2_video_std_construct(struct v4l2_standard *vs, ··· 90 92 struct video_device 91 93 { 92 94 /* device ops */ 93 - struct file_operations *fops; 95 + const struct file_operations *fops; 94 96 95 97 /* device info */ 96 98 struct device *dev; ··· 295 297 int (*vidioc_log_status) (struct file *file, void *fh); 296 298 297 299 298 - #if OBSOLETE_OWNER /* to be removed soon */ 300 + #ifdef OBSOLETE_OWNER /* to be removed soon */ 299 301 /* obsolete -- fops->owner is used instead */ 300 302 struct module *owner; 301 303 /* dev->driver_data will be used instead some day. ··· 349 351 class_device_remove_file(&vfd->class_dev, attr); 350 352 } 351 353 352 - #if OBSOLETE_OWNER /* to be removed soon */ 354 + #ifdef OBSOLETE_OWNER /* to be removed soon */ 353 355 /* helper functions to access driver private data. */ 354 356 static inline void *video_get_drvdata(struct video_device *dev) 355 357 {