Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 295055
b: refs/heads/master
c: b9d0aa6
h: refs/heads/master
i:
  295053: b5f8e3e
  295051: 2b6a16d
  295047: 832f0f9
  295039: 8845fad
v: v3
  • Loading branch information
Laurent Pinchart authored and Mauro Carvalho Chehab committed Mar 19, 2012
1 parent 0c20578 commit fe53f53
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 14 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: f769c26085ee0945fba3ba0ea48781770a8c81e2
refs/heads/master: b9d0aa6e211039548f1480a5838398d517f1c3a9
7 changes: 3 additions & 4 deletions trunk/drivers/media/video/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,13 @@ omap2cam-objs := omap24xxcam.o omap24xxcam-dma.o

videodev-objs := v4l2-dev.o v4l2-ioctl.o v4l2-device.o v4l2-fh.o \
v4l2-event.o v4l2-ctrls.o v4l2-subdev.o
ifeq ($(CONFIG_COMPAT),y)
videodev-objs += v4l2-compat-ioctl32.o
endif

# V4L2 core modules

obj-$(CONFIG_VIDEO_DEV) += videodev.o v4l2-int-device.o
ifeq ($(CONFIG_COMPAT),y)
obj-$(CONFIG_VIDEO_DEV) += v4l2-compat-ioctl32.o
endif

obj-$(CONFIG_VIDEO_V4L2_COMMON) += v4l2-common.o

# All i2c modules must come first:
Expand Down
20 changes: 11 additions & 9 deletions trunk/drivers/media/video/v4l2-compat-ioctl32.c
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,11 @@
*/

#include <linux/compat.h>
#include <linux/videodev2.h>
#include <linux/module.h>
#include <linux/videodev2.h>
#include <media/v4l2-dev.h>
#include <media/v4l2-ioctl.h>

#ifdef CONFIG_COMPAT

static long native_ioctl(struct file *file, unsigned int cmd, unsigned long arg)
{
long ret = -ENOIOCTLCMD;
Expand Down Expand Up @@ -937,6 +936,7 @@ static long do_video_ioctl(struct file *file, unsigned int cmd, unsigned long ar

long v4l2_compat_ioctl32(struct file *file, unsigned int cmd, unsigned long arg)
{
struct video_device *vdev = video_devdata(file);
long ret = -ENOIOCTLCMD;

if (!file->f_op->unlocked_ioctl)
Expand Down Expand Up @@ -1027,14 +1027,16 @@ long v4l2_compat_ioctl32(struct file *file, unsigned int cmd, unsigned long arg)
break;

default:
printk(KERN_WARNING "compat_ioctl32: "
"unknown ioctl '%c', dir=%d, #%d (0x%08x)\n",
_IOC_TYPE(cmd), _IOC_DIR(cmd), _IOC_NR(cmd), cmd);
if (vdev->fops->compat_ioctl32)
ret = vdev->fops->compat_ioctl32(file, cmd, arg);

if (ret == -ENOIOCTLCMD)
printk(KERN_WARNING "compat_ioctl32: "
"unknown ioctl '%c', dir=%d, #%d (0x%08x)\n",
_IOC_TYPE(cmd), _IOC_DIR(cmd), _IOC_NR(cmd),
cmd);
break;
}
return ret;
}
EXPORT_SYMBOL_GPL(v4l2_compat_ioctl32);
#endif

MODULE_LICENSE("GPL");
3 changes: 3 additions & 0 deletions trunk/include/media/v4l2-dev.h
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,9 @@ struct v4l2_file_operations {
unsigned int (*poll) (struct file *, struct poll_table_struct *);
long (*ioctl) (struct file *, unsigned int, unsigned long);
long (*unlocked_ioctl) (struct file *, unsigned int, unsigned long);
#ifdef CONFIG_COMPAT
long (*compat_ioctl32) (struct file *, unsigned int, unsigned long);
#endif
unsigned long (*get_unmapped_area) (struct file *, unsigned long,
unsigned long, unsigned long, unsigned long);
int (*mmap) (struct file *, struct vm_area_struct *);
Expand Down

0 comments on commit fe53f53

Please sign in to comment.