mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-09-03 17:40:04 +00:00
V4L/DVB: Fix a merge conflict that affects unlock_ioctl
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
This commit is contained in:
parent
be737a8269
commit
7242063018
1 changed files with 5 additions and 5 deletions
|
@ -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)
|
static long v4l2_ioctl(struct file *filp, unsigned int cmd, unsigned long arg)
|
||||||
{
|
{
|
||||||
struct video_device *vdev = video_devdata(filp);
|
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->fops->unlocked_ioctl) {
|
||||||
if (vdev->lock)
|
if (vdev->lock)
|
||||||
mutex_lock(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)
|
if (vdev->lock)
|
||||||
mutex_unlock(vdev->lock);
|
mutex_unlock(vdev->lock);
|
||||||
} else if (vdev->fops->ioctl) {
|
} else if (vdev->fops->ioctl) {
|
||||||
/* TODO: convert all drivers to unlocked_ioctl */
|
/* TODO: convert all drivers to unlocked_ioctl */
|
||||||
lock_kernel();
|
lock_kernel();
|
||||||
ret = vdev->fops->ioctl(filp, cmd, arg);
|
if (video_is_registered(vdev))
|
||||||
|
ret = vdev->fops->ioctl(filp, cmd, arg);
|
||||||
unlock_kernel();
|
unlock_kernel();
|
||||||
} else
|
} else
|
||||||
ret = -ENOTTY;
|
ret = -ENOTTY;
|
||||||
|
|
Loading…
Reference in a new issue