aboutsummaryrefslogtreecommitdiffstats
path: root/include/media/v4l2-ioctl.h
diff options
context:
space:
mode:
authorHans Verkuil <hverkuil@xs4all.nl>2008-07-20 07:12:02 -0400
committerMauro Carvalho Chehab <mchehab@infradead.org>2008-07-23 18:00:17 -0400
commit35ea11ff84719b1bfab2909903a9640a86552fd1 (patch)
tree5dff79cda158d7d2d4c8942d1b781c0108b95159 /include/media/v4l2-ioctl.h
parente81cf44428b9540d489a12880663488708bbb9c1 (diff)
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>
Diffstat (limited to 'include/media/v4l2-ioctl.h')
-rw-r--r--include/media/v4l2-ioctl.h57
1 files changed, 57 insertions, 0 deletions
diff --git a/include/media/v4l2-ioctl.h b/include/media/v4l2-ioctl.h
new file mode 100644
index 000000000000..685b1b62a054
--- /dev/null
+++ b/include/media/v4l2-ioctl.h
@@ -0,0 +1,57 @@
1/*
2 *
3 * V 4 L 2 D R I V E R H E L P E R A P I
4 *
5 * Moved from videodev2.h
6 *
7 * Some commonly needed functions for drivers (v4l2-common.o module)
8 */
9#ifndef _V4L2_IOCTL_H
10#define _V4L2_IOCTL_H
11
12#include <linux/poll.h>
13#include <linux/fs.h>
14#include <linux/device.h>
15#include <linux/mutex.h>
16#include <linux/compiler.h> /* need __user */
17#ifdef CONFIG_VIDEO_V4L1_COMPAT
18#include <linux/videodev.h>
19#else
20#include <linux/videodev2.h>
21#endif
22
23/* Video standard functions */
24extern const char *v4l2_norm_to_name(v4l2_std_id id);
25extern int v4l2_video_std_construct(struct v4l2_standard *vs,
26 int id, const char *name);
27/* Prints the ioctl in a human-readable format */
28extern void v4l_printk_ioctl(unsigned int cmd);
29
30/* names for fancy debug output */
31extern const char *v4l2_field_names[];
32extern const char *v4l2_type_names[];
33
34/* Compatibility layer interface -- v4l1-compat module */
35typedef int (*v4l2_kioctl)(struct inode *inode, struct file *file,
36 unsigned int cmd, void *arg);
37#ifdef CONFIG_VIDEO_V4L1_COMPAT
38int v4l_compat_translate_ioctl(struct inode *inode, struct file *file,
39 int cmd, void *arg, v4l2_kioctl driver_ioctl);
40#else
41#define v4l_compat_translate_ioctl(inode, file, cmd, arg, ioctl) (-EINVAL)
42#endif
43
44/* 32 Bits compatibility layer for 64 bits processors */
45extern long v4l_compat_ioctl32(struct file *file, unsigned int cmd,
46 unsigned long arg);
47
48extern int video_ioctl2(struct inode *inode, struct file *file,
49 unsigned int cmd, unsigned long arg);
50
51/* Include support for obsoleted stuff */
52extern int video_usercopy(struct inode *inode, struct file *file,
53 unsigned int cmd, unsigned long arg,
54 int (*func)(struct inode *inode, struct file *file,
55 unsigned int cmd, void *arg));
56
57#endif /* _V4L2_IOCTL_H */