Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 219230
b: refs/heads/master
c: 7242063
h: refs/heads/master
v: v3
  • Loading branch information
Mauro Carvalho Chehab committed Oct 21, 2010
1 parent a6824a5 commit 3fd0e9d
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 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: be737a826949760b75c3b46fc86686274965fca1
refs/heads/master: 7242063018c06977dc6825026b3075076e6f227b
10 changes: 5 additions & 5 deletions trunk/drivers/media/video/v4l2-dev.c
Original file line number Diff line number Diff line change
Expand Up @@ -236,20 +236,20 @@ static unsigned int v4l2_poll(struct file *filp, struct poll_table_struct *poll)
static long v4l2_ioctl(struct file *filp, unsigned int cmd, unsigned long arg)
{
struct video_device *vdev = video_devdata(filp);
int ret;
int ret = -ENODEV;

if (!vdev->fops->ioctl)
return -ENOTTY;
if (vdev->fops->unlocked_ioctl) {
if (vdev->lock)
mutex_lock(vdev->lock);
ret = vdev->fops->unlocked_ioctl(filp, cmd, arg);
if (video_is_registered(vdev))
ret = vdev->fops->unlocked_ioctl(filp, cmd, arg);
if (vdev->lock)
mutex_unlock(vdev->lock);
} else if (vdev->fops->ioctl) {
/* TODO: convert all drivers to unlocked_ioctl */
lock_kernel();
ret = vdev->fops->ioctl(filp, cmd, arg);
if (video_is_registered(vdev))
ret = vdev->fops->ioctl(filp, cmd, arg);
unlock_kernel();
} else
ret = -ENOTTY;
Expand Down

0 comments on commit 3fd0e9d

Please sign in to comment.