#include <linux/compat.h>
#include <linux/module.h>
#include <linux/videodev2.h>
#include <linux/v4l2-subdev.h>
#include <media/v4l2-dev.h>
#include <media/v4l2-fh.h>
#include <media/v4l2-ctrls.h>
#include <media/v4l2-ioctl.h>
struct v4l2_window32 { … };
static int get_v4l2_window32(struct v4l2_window *p64,
struct v4l2_window32 __user *p32)
{ … }
static int put_v4l2_window32(struct v4l2_window *p64,
struct v4l2_window32 __user *p32)
{ … }
struct v4l2_format32 { … };
struct v4l2_create_buffers32 { … };
static int get_v4l2_format32(struct v4l2_format *p64,
struct v4l2_format32 __user *p32)
{ … }
static int get_v4l2_create32(struct v4l2_create_buffers *p64,
struct v4l2_create_buffers32 __user *p32)
{ … }
static int put_v4l2_format32(struct v4l2_format *p64,
struct v4l2_format32 __user *p32)
{ … }
static int put_v4l2_create32(struct v4l2_create_buffers *p64,
struct v4l2_create_buffers32 __user *p32)
{ … }
struct v4l2_standard32 { … };
static int get_v4l2_standard32(struct v4l2_standard *p64,
struct v4l2_standard32 __user *p32)
{ … }
static int put_v4l2_standard32(struct v4l2_standard *p64,
struct v4l2_standard32 __user *p32)
{ … }
struct v4l2_plane32 { … };
struct v4l2_buffer32 { … };
#ifdef CONFIG_COMPAT_32BIT_TIME
struct v4l2_buffer32_time32 { … };
#endif
static int get_v4l2_plane32(struct v4l2_plane *p64,
struct v4l2_plane32 __user *p32,
enum v4l2_memory memory)
{ … }
static int put_v4l2_plane32(struct v4l2_plane *p64,
struct v4l2_plane32 __user *p32,
enum v4l2_memory memory)
{ … }
static int get_v4l2_buffer32(struct v4l2_buffer *vb,
struct v4l2_buffer32 __user *arg)
{ … }
#ifdef CONFIG_COMPAT_32BIT_TIME
static int get_v4l2_buffer32_time32(struct v4l2_buffer *vb,
struct v4l2_buffer32_time32 __user *arg)
{ … }
#endif
static int put_v4l2_buffer32(struct v4l2_buffer *vb,
struct v4l2_buffer32 __user *arg)
{ … }
#ifdef CONFIG_COMPAT_32BIT_TIME
static int put_v4l2_buffer32_time32(struct v4l2_buffer *vb,
struct v4l2_buffer32_time32 __user *arg)
{ … }
#endif
struct v4l2_framebuffer32 { … };
static int get_v4l2_framebuffer32(struct v4l2_framebuffer *p64,
struct v4l2_framebuffer32 __user *p32)
{ … }
static int put_v4l2_framebuffer32(struct v4l2_framebuffer *p64,
struct v4l2_framebuffer32 __user *p32)
{ … }
struct v4l2_input32 { … };
static inline int get_v4l2_input32(struct v4l2_input *p64,
struct v4l2_input32 __user *p32)
{ … }
static inline int put_v4l2_input32(struct v4l2_input *p64,
struct v4l2_input32 __user *p32)
{ … }
struct v4l2_ext_controls32 { … };
struct v4l2_ext_control32 { … } __attribute__ ((packed));
static inline bool ctrl_is_pointer(struct file *file, u32 id)
{ … }
static int get_v4l2_ext_controls32(struct v4l2_ext_controls *p64,
struct v4l2_ext_controls32 __user *p32)
{ … }
static int put_v4l2_ext_controls32(struct v4l2_ext_controls *p64,
struct v4l2_ext_controls32 __user *p32)
{ … }
#ifdef CONFIG_X86_64
struct v4l2_event32 { … };
static int put_v4l2_event32(struct v4l2_event *p64,
struct v4l2_event32 __user *p32)
{ … }
#endif
#ifdef CONFIG_COMPAT_32BIT_TIME
struct v4l2_event32_time32 { … };
static int put_v4l2_event32_time32(struct v4l2_event *p64,
struct v4l2_event32_time32 __user *p32)
{ … }
#endif
struct v4l2_edid32 { … };
static int get_v4l2_edid32(struct v4l2_edid *p64,
struct v4l2_edid32 __user *p32)
{ … }
static int put_v4l2_edid32(struct v4l2_edid *p64,
struct v4l2_edid32 __user *p32)
{ … }
#define VIDIOC_G_FMT32 …
#define VIDIOC_S_FMT32 …
#define VIDIOC_QUERYBUF32 …
#define VIDIOC_G_FBUF32 …
#define VIDIOC_S_FBUF32 …
#define VIDIOC_QBUF32 …
#define VIDIOC_DQBUF32 …
#define VIDIOC_ENUMSTD32 …
#define VIDIOC_ENUMINPUT32 …
#define VIDIOC_G_EDID32 …
#define VIDIOC_S_EDID32 …
#define VIDIOC_TRY_FMT32 …
#define VIDIOC_G_EXT_CTRLS32 …
#define VIDIOC_S_EXT_CTRLS32 …
#define VIDIOC_TRY_EXT_CTRLS32 …
#define VIDIOC_DQEVENT32 …
#define VIDIOC_CREATE_BUFS32 …
#define VIDIOC_PREPARE_BUF32 …
#ifdef CONFIG_COMPAT_32BIT_TIME
#define VIDIOC_QUERYBUF32_TIME32 …
#define VIDIOC_QBUF32_TIME32 …
#define VIDIOC_DQBUF32_TIME32 …
#define VIDIOC_DQEVENT32_TIME32 …
#define VIDIOC_PREPARE_BUF32_TIME32 …
#endif
unsigned int v4l2_compat_translate_cmd(unsigned int cmd)
{ … }
int v4l2_compat_get_user(void __user *arg, void *parg, unsigned int cmd)
{ … }
int v4l2_compat_put_user(void __user *arg, void *parg, unsigned int cmd)
{ … }
int v4l2_compat_get_array_args(struct file *file, void *mbuf,
void __user *user_ptr, size_t array_size,
unsigned int cmd, void *arg)
{ … }
int v4l2_compat_put_array_args(struct file *file, void __user *user_ptr,
void *mbuf, size_t array_size,
unsigned int cmd, void *arg)
{ … }
long v4l2_compat_ioctl32(struct file *file, unsigned int cmd, unsigned long arg)
{ … }
EXPORT_SYMBOL_GPL(…);