summaryrefslogtreecommitdiff
path: root/drivers/media/pci/cx23885/cx23885-417.c
diff options
context:
space:
mode:
authorHans Verkuil <hans.verkuil@cisco.com>2014-08-09 11:29:55 -0300
committerMauro Carvalho Chehab <m.chehab@samsung.com>2014-09-03 07:47:21 -0300
commit24a8f7b5648ff8dfd8d26f8444ab4b04286dba98 (patch)
tree75e0081767f1d3a6e1c0b342ea8b3e0d152aa76d /drivers/media/pci/cx23885/cx23885-417.c
parent86dd9831aea494e3e5c565c697df60484f55780c (diff)
[media] cx23885: use core locking, switch to unlocked_ioctl
Enable core locking which allows us to safely switch to unlocked_ioctl. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
Diffstat (limited to 'drivers/media/pci/cx23885/cx23885-417.c')
-rw-r--r--drivers/media/pci/cx23885/cx23885-417.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/drivers/media/pci/cx23885/cx23885-417.c b/drivers/media/pci/cx23885/cx23885-417.c
index b65de33a6e23..395f7a987d61 100644
--- a/drivers/media/pci/cx23885/cx23885-417.c
+++ b/drivers/media/pci/cx23885/cx23885-417.c
@@ -1235,9 +1235,7 @@ static int vidioc_s_std(struct file *file, void *priv, v4l2_std_id id)
dev->encodernorm = cx23885_tvnorms[i];
/* Have the drier core notify the subdevices */
- mutex_lock(&dev->lock);
cx23885_set_tvnorm(dev, id);
- mutex_unlock(&dev->lock);
return 0;
}
@@ -1661,7 +1659,7 @@ static struct v4l2_file_operations mpeg_fops = {
.read = mpeg_read,
.poll = mpeg_poll,
.mmap = mpeg_mmap,
- .ioctl = video_ioctl2,
+ .unlocked_ioctl = video_ioctl2,
};
static const struct v4l2_ioctl_ops mpeg_ioctl_ops = {
@@ -1770,6 +1768,7 @@ int cx23885_417_register(struct cx23885_dev *dev)
dev->v4l_device = cx23885_video_dev_alloc(tsport,
dev->pci, &cx23885_mpeg_template, "mpeg");
video_set_drvdata(dev->v4l_device, dev);
+ dev->v4l_device->lock = &dev->lock;
err = video_register_device(dev->v4l_device,
VFL_TYPE_GRABBER, -1);
if (err < 0) {