V4L/DVB (8430): videodev: move some functions from v4l2-dev.h to v4l2-common.h or v4l2-ioctl.h
The functions in a header should not belong to another module. The prio functions belong to v4l2-common.c, so move them to v4l2-common.h. The ioctl functions belong to v4l2-ioctl.c, so create a new v4l2-ioctl.h header and move those functions to it. Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
This commit is contained in:
parent
e81cf44428
commit
35ea11ff84
@ -85,6 +85,7 @@
|
||||
#include <linux/input.h>
|
||||
#include <linux/videodev2.h>
|
||||
#include <media/v4l2-common.h>
|
||||
#include <media/v4l2-ioctl.h>
|
||||
#include <linux/usb.h>
|
||||
|
||||
/*
|
||||
|
@ -23,6 +23,7 @@
|
||||
#include <linux/init.h>
|
||||
#include <linux/videodev.h>
|
||||
#include <media/v4l2-common.h>
|
||||
#include <media/v4l2-ioctl.h>
|
||||
#include "oss/aci.h"
|
||||
#include "miropcm20-rds-core.h"
|
||||
|
||||
|
@ -36,6 +36,7 @@
|
||||
#include <asm/uaccess.h> /* copy to/from user */
|
||||
#include <linux/videodev2.h> /* kernel radio structs */
|
||||
#include <media/v4l2-common.h>
|
||||
#include <media/v4l2-ioctl.h>
|
||||
|
||||
#include <linux/version.h> /* for KERNEL_VERSION MACRO */
|
||||
#define RADIO_VERSION KERNEL_VERSION(0,0,2)
|
||||
|
@ -33,6 +33,7 @@
|
||||
#include <asm/uaccess.h> /* copy to/from user */
|
||||
#include <linux/videodev2.h> /* kernel radio structs */
|
||||
#include <media/v4l2-common.h>
|
||||
#include <media/v4l2-ioctl.h>
|
||||
|
||||
#include <linux/version.h> /* for KERNEL_VERSION MACRO */
|
||||
#define RADIO_VERSION KERNEL_VERSION(0,0,2)
|
||||
|
@ -39,6 +39,7 @@
|
||||
#include <asm/uaccess.h> /* copy to/from user */
|
||||
#include <linux/videodev2.h> /* V4L2 API defs */
|
||||
#include <media/v4l2-common.h>
|
||||
#include <media/v4l2-ioctl.h>
|
||||
#include <linux/param.h>
|
||||
#include <linux/pnp.h>
|
||||
|
||||
|
@ -46,6 +46,7 @@
|
||||
#include <linux/pci.h>
|
||||
#include <linux/videodev2.h>
|
||||
#include <media/v4l2-common.h>
|
||||
#include <media/v4l2-ioctl.h>
|
||||
#include <linux/errno.h>
|
||||
|
||||
#include <linux/version.h> /* for KERNEL_VERSION MACRO */
|
||||
|
@ -23,6 +23,7 @@
|
||||
#include <asm/io.h> /* outb, outb_p */
|
||||
#include <asm/uaccess.h> /* copy to/from user */
|
||||
#include <linux/videodev2.h> /* kernel radio structs */
|
||||
#include <media/v4l2-ioctl.h>
|
||||
#include <media/v4l2-common.h>
|
||||
#include <linux/spinlock.h>
|
||||
|
||||
|
@ -27,6 +27,7 @@
|
||||
#include <linux/pci.h>
|
||||
#include <linux/videodev2.h>
|
||||
#include <media/v4l2-common.h>
|
||||
#include <media/v4l2-ioctl.h>
|
||||
|
||||
#include <linux/version.h> /* for KERNEL_VERSION MACRO */
|
||||
#define RADIO_VERSION KERNEL_VERSION(0,0,6)
|
||||
|
@ -44,6 +44,7 @@
|
||||
#include <linux/pci.h>
|
||||
#include <linux/videodev2.h>
|
||||
#include <media/v4l2-common.h>
|
||||
#include <media/v4l2-ioctl.h>
|
||||
|
||||
#define DRIVER_VERSION "0.77"
|
||||
|
||||
|
@ -17,6 +17,7 @@
|
||||
#include <asm/uaccess.h> /* copy to/from user */
|
||||
#include <linux/videodev2.h> /* kernel radio structs */
|
||||
#include <media/v4l2-common.h>
|
||||
#include <media/v4l2-ioctl.h>
|
||||
#include <linux/spinlock.h>
|
||||
|
||||
#include <linux/version.h> /* for KERNEL_VERSION MACRO */
|
||||
|
@ -24,6 +24,7 @@
|
||||
#include <linux/delay.h> /* udelay */
|
||||
#include <linux/videodev2.h> /* kernel radio structs */
|
||||
#include <media/v4l2-common.h>
|
||||
#include <media/v4l2-ioctl.h>
|
||||
#include <linux/isapnp.h>
|
||||
#include <asm/io.h> /* outb, outb_p */
|
||||
#include <asm/uaccess.h> /* copy to/from user */
|
||||
|
@ -22,6 +22,7 @@
|
||||
#include <asm/uaccess.h> /* copy to/from user */
|
||||
#include <linux/videodev2.h> /* kernel radio structs */
|
||||
#include <media/v4l2-common.h>
|
||||
#include <media/v4l2-ioctl.h>
|
||||
#include <linux/mutex.h>
|
||||
|
||||
static struct mutex lock;
|
||||
|
@ -133,6 +133,7 @@
|
||||
#include <linux/videodev2.h>
|
||||
#include <linux/mutex.h>
|
||||
#include <media/v4l2-common.h>
|
||||
#include <media/v4l2-ioctl.h>
|
||||
#include <media/rds.h>
|
||||
#include <asm/unaligned.h>
|
||||
|
||||
|
@ -32,6 +32,7 @@
|
||||
#include <asm/uaccess.h> /* copy to/from user */
|
||||
#include <linux/videodev2.h> /* kernel radio structs */
|
||||
#include <media/v4l2-common.h>
|
||||
#include <media/v4l2-ioctl.h>
|
||||
#include <linux/spinlock.h>
|
||||
|
||||
#include <linux/version.h> /* for KERNEL_VERSION MACRO */
|
||||
|
@ -23,6 +23,7 @@
|
||||
#include <asm/uaccess.h>
|
||||
#include <linux/videodev2.h>
|
||||
#include <media/v4l2-common.h>
|
||||
#include <media/v4l2-ioctl.h>
|
||||
|
||||
#include <linux/version.h> /* for KERNEL_VERSION MACRO */
|
||||
#define RADIO_VERSION KERNEL_VERSION(0,0,2)
|
||||
|
@ -40,6 +40,7 @@
|
||||
#include <asm/uaccess.h> /* copy to/from user */
|
||||
#include <linux/videodev2.h> /* kernel radio structs */
|
||||
#include <media/v4l2-common.h>
|
||||
#include <media/v4l2-ioctl.h>
|
||||
|
||||
#include <linux/version.h> /* for KERNEL_VERSION MACRO */
|
||||
#define RADIO_VERSION KERNEL_VERSION(0,1,1)
|
||||
|
@ -37,6 +37,7 @@
|
||||
#include <asm/uaccess.h> /* copy to/from user */
|
||||
#include <linux/videodev2.h> /* kernel radio structs */
|
||||
#include <media/v4l2-common.h>
|
||||
#include <media/v4l2-ioctl.h>
|
||||
|
||||
#include <linux/version.h> /* for KERNEL_VERSION MACRO */
|
||||
#define RADIO_VERSION KERNEL_VERSION(0,0,2)
|
||||
|
@ -45,6 +45,7 @@
|
||||
#include <linux/kdev_t.h>
|
||||
#include "bttvp.h"
|
||||
#include <media/v4l2-common.h>
|
||||
#include <media/v4l2-ioctl.h>
|
||||
#include <media/tvaudio.h>
|
||||
#include <media/msp3400.h>
|
||||
|
||||
|
@ -31,6 +31,7 @@
|
||||
#include <linux/interrupt.h>
|
||||
#include <asm/page.h>
|
||||
#include <asm/pgtable.h>
|
||||
#include <media/v4l2-ioctl.h>
|
||||
|
||||
#include "bttvp.h"
|
||||
|
||||
|
@ -29,6 +29,7 @@
|
||||
#include <linux/kernel.h>
|
||||
#include <linux/interrupt.h>
|
||||
#include <linux/kdev_t.h>
|
||||
#include <media/v4l2-ioctl.h>
|
||||
#include <asm/io.h>
|
||||
#include "bttvp.h"
|
||||
|
||||
|
@ -74,6 +74,7 @@ OTHER DEALINGS IN THE SOFTWARE.
|
||||
#include <linux/sched.h>
|
||||
#include <linux/videodev.h>
|
||||
#include <media/v4l2-common.h>
|
||||
#include <media/v4l2-ioctl.h>
|
||||
#include <linux/mutex.h>
|
||||
#include <asm/uaccess.h>
|
||||
|
||||
|
@ -35,6 +35,7 @@
|
||||
#include <linux/sched.h>
|
||||
#include <linux/videodev.h>
|
||||
#include <media/v4l2-common.h>
|
||||
#include <media/v4l2-ioctl.h>
|
||||
#include <linux/mutex.h>
|
||||
#include <linux/jiffies.h>
|
||||
|
||||
|
@ -25,6 +25,7 @@
|
||||
#include <linux/spinlock.h>
|
||||
#include <linux/videodev2.h>
|
||||
#include <media/v4l2-common.h>
|
||||
#include <media/v4l2-ioctl.h>
|
||||
#include <media/v4l2-chip-ident.h>
|
||||
#include <linux/device.h>
|
||||
#include <linux/wait.h>
|
||||
|
@ -46,6 +46,7 @@
|
||||
#include <asm/uaccess.h>
|
||||
#include <linux/videodev.h>
|
||||
#include <media/v4l2-common.h>
|
||||
#include <media/v4l2-ioctl.h>
|
||||
#include <linux/list.h>
|
||||
#include <linux/mutex.h>
|
||||
|
||||
|
@ -37,6 +37,7 @@
|
||||
#include <linux/sched.h>
|
||||
#include <linux/slab.h>
|
||||
#include <linux/init.h>
|
||||
#include <media/v4l2-ioctl.h>
|
||||
|
||||
#include "cpia2.h"
|
||||
#include "cpia2dev.h"
|
||||
|
@ -46,6 +46,7 @@
|
||||
#include <linux/dvb/video.h>
|
||||
#include <linux/dvb/audio.h>
|
||||
#include <media/v4l2-common.h>
|
||||
#include <media/v4l2-ioctl.h>
|
||||
#include <media/tuner.h>
|
||||
#include "cx18-mailbox.h"
|
||||
#include "cx18-av-core.h"
|
||||
|
@ -32,6 +32,7 @@
|
||||
#include <linux/device.h>
|
||||
#include <linux/firmware.h>
|
||||
#include <media/v4l2-common.h>
|
||||
#include <media/v4l2-ioctl.h>
|
||||
#include <media/cx2341x.h>
|
||||
|
||||
#include "cx23885.h"
|
||||
|
@ -33,6 +33,7 @@
|
||||
|
||||
#include "cx23885.h"
|
||||
#include <media/v4l2-common.h>
|
||||
#include <media/v4l2-ioctl.h>
|
||||
|
||||
#ifdef CONFIG_VIDEO_V4L1_COMPAT
|
||||
/* Include V4L1 specific functions. Should be removed soon */
|
||||
|
@ -33,6 +33,7 @@
|
||||
#include <linux/device.h>
|
||||
#include <linux/firmware.h>
|
||||
#include <media/v4l2-common.h>
|
||||
#include <media/v4l2-ioctl.h>
|
||||
#include <media/cx2341x.h>
|
||||
|
||||
#include "cx88.h"
|
||||
|
@ -40,6 +40,7 @@
|
||||
|
||||
#include "cx88.h"
|
||||
#include <media/v4l2-common.h>
|
||||
#include <media/v4l2-ioctl.h>
|
||||
|
||||
MODULE_DESCRIPTION("v4l2 driver module for cx2388x based TV cards");
|
||||
MODULE_AUTHOR("Gerd Knorr <kraxel@bytesex.org> [SuSE Labs]");
|
||||
|
@ -39,6 +39,7 @@
|
||||
|
||||
#include "cx88.h"
|
||||
#include <media/v4l2-common.h>
|
||||
#include <media/v4l2-ioctl.h>
|
||||
|
||||
#ifdef CONFIG_VIDEO_V4L1_COMPAT
|
||||
/* Include V4L1 specific functions. Should be removed soon */
|
||||
|
@ -38,6 +38,7 @@
|
||||
|
||||
#include "em28xx.h"
|
||||
#include <media/v4l2-common.h>
|
||||
#include <media/v4l2-ioctl.h>
|
||||
#include <media/msp3400.h>
|
||||
#include <media/tuner.h>
|
||||
|
||||
|
@ -34,6 +34,7 @@
|
||||
#include <linux/mm.h>
|
||||
#include <linux/vmalloc.h>
|
||||
#include <linux/page-flags.h>
|
||||
#include <media/v4l2-ioctl.h>
|
||||
#include <asm/byteorder.h>
|
||||
#include <asm/page.h>
|
||||
#include <asm/uaccess.h>
|
||||
|
@ -32,6 +32,7 @@
|
||||
#include <asm/page.h>
|
||||
#include <linux/uaccess.h>
|
||||
#include <linux/jiffies.h>
|
||||
#include <media/v4l2-ioctl.h>
|
||||
|
||||
#include "gspca.h"
|
||||
|
||||
|
@ -60,6 +60,7 @@
|
||||
#include <linux/dvb/video.h>
|
||||
#include <linux/dvb/audio.h>
|
||||
#include <media/v4l2-common.h>
|
||||
#include <media/v4l2-ioctl.h>
|
||||
#include <media/tuner.h>
|
||||
#include <media/cx2341x.h>
|
||||
|
||||
|
@ -31,6 +31,7 @@
|
||||
#include <linux/init.h>
|
||||
#include <linux/videodev.h>
|
||||
#include <media/v4l2-common.h>
|
||||
#include <media/v4l2-ioctl.h>
|
||||
#include <asm/uaccess.h>
|
||||
#include <asm/io.h>
|
||||
#include <linux/delay.h>
|
||||
|
@ -54,6 +54,7 @@
|
||||
#include <linux/videodev.h>
|
||||
#include <linux/videodev2.h>
|
||||
#include <media/v4l2-common.h>
|
||||
#include <media/v4l2-ioctl.h>
|
||||
#include <media/v4l2-i2c-drv-legacy.h>
|
||||
#include <media/tvaudio.h>
|
||||
#include <media/msp3400.h>
|
||||
|
@ -4,6 +4,7 @@
|
||||
#include <asm/uaccess.h>
|
||||
#include <linux/videodev.h>
|
||||
#include <media/v4l2-common.h>
|
||||
#include <media/v4l2-ioctl.h>
|
||||
#include <linux/usb.h>
|
||||
#include <linux/mutex.h>
|
||||
|
||||
|
@ -30,6 +30,7 @@
|
||||
#include <asm/io.h>
|
||||
#include <linux/videodev.h>
|
||||
#include <media/v4l2-common.h>
|
||||
#include <media/v4l2-ioctl.h>
|
||||
#include <linux/mutex.h>
|
||||
|
||||
#include <asm/uaccess.h>
|
||||
|
@ -30,6 +30,7 @@
|
||||
#include <linux/videodev2.h>
|
||||
#include <media/v4l2-dev.h>
|
||||
#include <media/v4l2-common.h>
|
||||
#include <media/v4l2-ioctl.h>
|
||||
|
||||
struct pvr2_v4l2_dev;
|
||||
struct pvr2_v4l2_fh;
|
||||
|
@ -35,6 +35,7 @@
|
||||
#include <asm/errno.h>
|
||||
#include <linux/videodev.h>
|
||||
#include <media/v4l2-common.h>
|
||||
#include <media/v4l2-ioctl.h>
|
||||
|
||||
#include "pwc-uncompress.h"
|
||||
#include <media/pwc-ioctl.h>
|
||||
|
@ -49,6 +49,7 @@
|
||||
#include <linux/version.h>
|
||||
#include <media/videobuf-vmalloc.h>
|
||||
#include <media/v4l2-common.h>
|
||||
#include <media/v4l2-ioctl.h>
|
||||
#include <linux/vmalloc.h>
|
||||
#include <linux/usb.h>
|
||||
|
||||
|
@ -46,6 +46,7 @@
|
||||
#include <linux/videotext.h>
|
||||
#include <linux/videodev.h>
|
||||
#include <media/v4l2-common.h>
|
||||
#include <media/v4l2-ioctl.h>
|
||||
#include <linux/mutex.h>
|
||||
|
||||
#include "saa5246a.h"
|
||||
|
@ -57,6 +57,7 @@
|
||||
#include <linux/videotext.h>
|
||||
#include <linux/videodev.h>
|
||||
#include <media/v4l2-common.h>
|
||||
#include <media/v4l2-ioctl.h>
|
||||
#include <linux/mutex.h>
|
||||
|
||||
|
||||
|
@ -34,6 +34,7 @@
|
||||
#include <asm/io.h>
|
||||
|
||||
#include <media/v4l2-common.h>
|
||||
#include <media/v4l2-ioctl.h>
|
||||
#include <media/tuner.h>
|
||||
#include <media/ir-common.h>
|
||||
#include <media/ir-kbd-i2c.h>
|
||||
|
@ -5,6 +5,7 @@
|
||||
#include <asm/uaccess.h>
|
||||
#include <linux/videodev.h>
|
||||
#include <media/v4l2-common.h>
|
||||
#include <media/v4l2-ioctl.h>
|
||||
#include <linux/mutex.h>
|
||||
|
||||
#define se401_DEBUG /* Turn on debug messages */
|
||||
|
@ -25,6 +25,7 @@
|
||||
#include <linux/usb.h>
|
||||
#include <linux/videodev2.h>
|
||||
#include <media/v4l2-common.h>
|
||||
#include <media/v4l2-ioctl.h>
|
||||
#include <linux/device.h>
|
||||
#include <linux/list.h>
|
||||
#include <linux/spinlock.h>
|
||||
|
@ -25,6 +25,7 @@
|
||||
#include <linux/vmalloc.h>
|
||||
|
||||
#include <media/v4l2-common.h>
|
||||
#include <media/v4l2-ioctl.h>
|
||||
#include <media/v4l2-dev.h>
|
||||
#include <media/videobuf-core.h>
|
||||
#include <media/soc_camera.h>
|
||||
|
@ -34,6 +34,7 @@
|
||||
#include <linux/vmalloc.h>
|
||||
#include <linux/videodev2.h>
|
||||
#include <media/v4l2-common.h>
|
||||
#include <media/v4l2-ioctl.h>
|
||||
|
||||
#include "stk-webcam.h"
|
||||
|
||||
|
@ -66,6 +66,7 @@
|
||||
#include <linux/errno.h>
|
||||
#include <linux/videodev.h>
|
||||
#include <media/v4l2-common.h>
|
||||
#include <media/v4l2-ioctl.h>
|
||||
#include <linux/usb.h>
|
||||
#include <linux/mutex.h>
|
||||
|
||||
|
@ -48,6 +48,7 @@
|
||||
#include <linux/i2c.h>
|
||||
|
||||
#include <media/v4l2-common.h>
|
||||
#include <media/v4l2-ioctl.h>
|
||||
#include <media/i2c-addr.h>
|
||||
|
||||
#ifndef VIDEO_AUDIO_BALANCE
|
||||
|
@ -19,6 +19,7 @@
|
||||
#include <media/tuner.h>
|
||||
#include <media/tuner-types.h>
|
||||
#include <media/v4l2-common.h>
|
||||
#include <media/v4l2-ioctl.h>
|
||||
#include <media/v4l2-i2c-drv-legacy.h>
|
||||
#include "mt20xx.h"
|
||||
#include "tda8290.h"
|
||||
|
@ -18,6 +18,7 @@
|
||||
|
||||
#include <linux/videodev.h>
|
||||
#include <media/v4l2-common.h>
|
||||
#include <media/v4l2-ioctl.h>
|
||||
#include <linux/usb.h>
|
||||
#include <linux/mutex.h>
|
||||
|
||||
|
@ -65,6 +65,7 @@
|
||||
|
||||
#include <media/saa7115.h>
|
||||
#include <media/v4l2-common.h>
|
||||
#include <media/v4l2-ioctl.h>
|
||||
#include <media/tuner.h>
|
||||
#include <media/audiochip.h>
|
||||
|
||||
|
@ -23,6 +23,7 @@
|
||||
#include <asm/atomic.h>
|
||||
|
||||
#include <media/v4l2-common.h>
|
||||
#include <media/v4l2-ioctl.h>
|
||||
|
||||
#include "uvcvideo.h"
|
||||
|
||||
|
@ -30,6 +30,7 @@
|
||||
#include <linux/slab.h>
|
||||
#include <linux/videodev.h>
|
||||
#include <media/v4l2-common.h>
|
||||
#include <media/v4l2-ioctl.h>
|
||||
|
||||
#include <asm/uaccess.h>
|
||||
#include <asm/system.h>
|
||||
|
1865
drivers/media/video/v4l2-ioctl.c
Normal file
1865
drivers/media/video/v4l2-ioctl.c
Normal file
File diff suppressed because it is too large
Load Diff
@ -35,6 +35,7 @@
|
||||
#include <linux/interrupt.h>
|
||||
#include <media/videobuf-vmalloc.h>
|
||||
#include <media/v4l2-common.h>
|
||||
#include <media/v4l2-ioctl.h>
|
||||
#include <linux/kthread.h>
|
||||
#include <linux/highmem.h>
|
||||
#include <linux/freezer.h>
|
||||
|
@ -59,6 +59,7 @@
|
||||
#include <linux/delay.h>
|
||||
#include <linux/videodev.h>
|
||||
#include <media/v4l2-common.h>
|
||||
#include <media/v4l2-ioctl.h>
|
||||
#include <linux/parport.h>
|
||||
|
||||
/*#define DEBUG*/ /* Undef me for production */
|
||||
|
@ -25,6 +25,7 @@
|
||||
#include <linux/usb.h>
|
||||
#include <linux/videodev2.h>
|
||||
#include <media/v4l2-common.h>
|
||||
#include <media/v4l2-ioctl.h>
|
||||
#include <linux/device.h>
|
||||
#include <linux/list.h>
|
||||
#include <linux/spinlock.h>
|
||||
|
@ -71,6 +71,7 @@
|
||||
|
||||
#include <linux/videodev.h>
|
||||
#include <media/v4l2-common.h>
|
||||
#include <media/v4l2-ioctl.h>
|
||||
#include "videocodec.h"
|
||||
|
||||
#include <asm/byteorder.h>
|
||||
|
@ -35,6 +35,7 @@
|
||||
#include <linux/proc_fs.h>
|
||||
#include <linux/highmem.h>
|
||||
#include <media/v4l2-common.h>
|
||||
#include <media/v4l2-ioctl.h>
|
||||
|
||||
|
||||
/* Version Information */
|
||||
|
@ -2,6 +2,7 @@
|
||||
#define __SAA7146_VV__
|
||||
|
||||
#include <media/v4l2-common.h>
|
||||
#include <media/v4l2-ioctl.h>
|
||||
#include <media/saa7146.h>
|
||||
#include <media/videobuf-dma-sg.h>
|
||||
|
||||
|
@ -79,6 +79,21 @@
|
||||
|
||||
/* ------------------------------------------------------------------------- */
|
||||
|
||||
/* Priority helper functions */
|
||||
|
||||
struct v4l2_prio_state {
|
||||
atomic_t prios[4];
|
||||
};
|
||||
int v4l2_prio_init(struct v4l2_prio_state *global);
|
||||
int v4l2_prio_change(struct v4l2_prio_state *global, enum v4l2_priority *local,
|
||||
enum v4l2_priority new);
|
||||
int v4l2_prio_open(struct v4l2_prio_state *global, enum v4l2_priority *local);
|
||||
int v4l2_prio_close(struct v4l2_prio_state *global, enum v4l2_priority *local);
|
||||
enum v4l2_priority v4l2_prio_max(struct v4l2_prio_state *global);
|
||||
int v4l2_prio_check(struct v4l2_prio_state *global, enum v4l2_priority *local);
|
||||
|
||||
/* ------------------------------------------------------------------------- */
|
||||
|
||||
/* Control helper functions */
|
||||
|
||||
int v4l2_ctrl_check(struct v4l2_ext_control *ctrl, struct v4l2_queryctrl *qctrl,
|
||||
|
@ -39,43 +39,6 @@
|
||||
#define VFL_TYPE_RADIO 2
|
||||
#define VFL_TYPE_VTX 3
|
||||
|
||||
/* Video standard functions */
|
||||
extern const char *v4l2_norm_to_name(v4l2_std_id id);
|
||||
extern int v4l2_video_std_construct(struct v4l2_standard *vs,
|
||||
int id, const char *name);
|
||||
/* Prints the ioctl in a human-readable format */
|
||||
extern void v4l_printk_ioctl(unsigned int cmd);
|
||||
|
||||
/* prority handling */
|
||||
struct v4l2_prio_state {
|
||||
atomic_t prios[4];
|
||||
};
|
||||
int v4l2_prio_init(struct v4l2_prio_state *global);
|
||||
int v4l2_prio_change(struct v4l2_prio_state *global, enum v4l2_priority *local,
|
||||
enum v4l2_priority new);
|
||||
int v4l2_prio_open(struct v4l2_prio_state *global, enum v4l2_priority *local);
|
||||
int v4l2_prio_close(struct v4l2_prio_state *global, enum v4l2_priority *local);
|
||||
enum v4l2_priority v4l2_prio_max(struct v4l2_prio_state *global);
|
||||
int v4l2_prio_check(struct v4l2_prio_state *global, enum v4l2_priority *local);
|
||||
|
||||
/* names for fancy debug output */
|
||||
extern const char *v4l2_field_names[];
|
||||
extern const char *v4l2_type_names[];
|
||||
|
||||
/* Compatibility layer interface -- v4l1-compat module */
|
||||
typedef int (*v4l2_kioctl)(struct inode *inode, struct file *file,
|
||||
unsigned int cmd, void *arg);
|
||||
#ifdef CONFIG_VIDEO_V4L1_COMPAT
|
||||
int v4l_compat_translate_ioctl(struct inode *inode, struct file *file,
|
||||
int cmd, void *arg, v4l2_kioctl driver_ioctl);
|
||||
#else
|
||||
#define v4l_compat_translate_ioctl(inode,file,cmd,arg,ioctl) -EINVAL
|
||||
#endif
|
||||
|
||||
/* 32 Bits compatibility layer for 64 bits processors */
|
||||
extern long v4l_compat_ioctl32(struct file *file, unsigned int cmd,
|
||||
unsigned long arg);
|
||||
|
||||
/*
|
||||
* Newer version of video_device, handled by videodev2.c
|
||||
* This version moves redundant code from video device code to
|
||||
@ -352,20 +315,12 @@ extern int video_register_device(struct video_device *vfd, int type, int nr);
|
||||
int video_register_device_index(struct video_device *vfd, int type, int nr,
|
||||
int index);
|
||||
void video_unregister_device(struct video_device *);
|
||||
extern int video_ioctl2(struct inode *inode, struct file *file,
|
||||
unsigned int cmd, unsigned long arg);
|
||||
|
||||
/* helper functions to alloc / release struct video_device, the
|
||||
later can be used for video_device->release() */
|
||||
struct video_device *video_device_alloc(void);
|
||||
void video_device_release(struct video_device *vfd);
|
||||
|
||||
/* Include support for obsoleted stuff */
|
||||
extern int video_usercopy(struct inode *inode, struct file *file,
|
||||
unsigned int cmd, unsigned long arg,
|
||||
int (*func)(struct inode *inode, struct file *file,
|
||||
unsigned int cmd, void *arg));
|
||||
|
||||
#ifdef CONFIG_VIDEO_V4L1_COMPAT
|
||||
#include <linux/mm.h>
|
||||
|
||||
|
57
include/media/v4l2-ioctl.h
Normal file
57
include/media/v4l2-ioctl.h
Normal file
@ -0,0 +1,57 @@
|
||||
/*
|
||||
*
|
||||
* V 4 L 2 D R I V E R H E L P E R A P I
|
||||
*
|
||||
* Moved from videodev2.h
|
||||
*
|
||||
* Some commonly needed functions for drivers (v4l2-common.o module)
|
||||
*/
|
||||
#ifndef _V4L2_IOCTL_H
|
||||
#define _V4L2_IOCTL_H
|
||||
|
||||
#include <linux/poll.h>
|
||||
#include <linux/fs.h>
|
||||
#include <linux/device.h>
|
||||
#include <linux/mutex.h>
|
||||
#include <linux/compiler.h> /* need __user */
|
||||
#ifdef CONFIG_VIDEO_V4L1_COMPAT
|
||||
#include <linux/videodev.h>
|
||||
#else
|
||||
#include <linux/videodev2.h>
|
||||
#endif
|
||||
|
||||
/* Video standard functions */
|
||||
extern const char *v4l2_norm_to_name(v4l2_std_id id);
|
||||
extern int v4l2_video_std_construct(struct v4l2_standard *vs,
|
||||
int id, const char *name);
|
||||
/* Prints the ioctl in a human-readable format */
|
||||
extern void v4l_printk_ioctl(unsigned int cmd);
|
||||
|
||||
/* names for fancy debug output */
|
||||
extern const char *v4l2_field_names[];
|
||||
extern const char *v4l2_type_names[];
|
||||
|
||||
/* Compatibility layer interface -- v4l1-compat module */
|
||||
typedef int (*v4l2_kioctl)(struct inode *inode, struct file *file,
|
||||
unsigned int cmd, void *arg);
|
||||
#ifdef CONFIG_VIDEO_V4L1_COMPAT
|
||||
int v4l_compat_translate_ioctl(struct inode *inode, struct file *file,
|
||||
int cmd, void *arg, v4l2_kioctl driver_ioctl);
|
||||
#else
|
||||
#define v4l_compat_translate_ioctl(inode, file, cmd, arg, ioctl) (-EINVAL)
|
||||
#endif
|
||||
|
||||
/* 32 Bits compatibility layer for 64 bits processors */
|
||||
extern long v4l_compat_ioctl32(struct file *file, unsigned int cmd,
|
||||
unsigned long arg);
|
||||
|
||||
extern int video_ioctl2(struct inode *inode, struct file *file,
|
||||
unsigned int cmd, unsigned long arg);
|
||||
|
||||
/* Include support for obsoleted stuff */
|
||||
extern int video_usercopy(struct inode *inode, struct file *file,
|
||||
unsigned int cmd, unsigned long arg,
|
||||
int (*func)(struct inode *inode, struct file *file,
|
||||
unsigned int cmd, void *arg));
|
||||
|
||||
#endif /* _V4L2_IOCTL_H */
|
Loading…
Reference in New Issue
Block a user