summaryrefslogtreecommitdiffstats
path: root/drivers/media/pci/zoran/zoran_card.c
diff options
context:
space:
mode:
authorHans Verkuil2015-07-20 15:18:20 +0200
committerMauro Carvalho Chehab2015-08-11 12:00:39 +0200
commit7b962d43ef875f3a524e92ca944816b862470e21 (patch)
treef5a6d00cd4f343d2823b95264a1b542a433fc1b7 /drivers/media/pci/zoran/zoran_card.c
parent[media] zoran: remove unused read/write functions (diff)
downloadkernel-qcow2-linux-7b962d43ef875f3a524e92ca944816b862470e21.tar.gz
kernel-qcow2-linux-7b962d43ef875f3a524e92ca944816b862470e21.tar.xz
kernel-qcow2-linux-7b962d43ef875f3a524e92ca944816b862470e21.zip
[media] zoran: use standard core lock
Use the standard core lock to take care of serializing ioctl calls and to serialize file operations. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
Diffstat (limited to 'drivers/media/pci/zoran/zoran_card.c')
-rw-r--r--drivers/media/pci/zoran/zoran_card.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/media/pci/zoran/zoran_card.c b/drivers/media/pci/zoran/zoran_card.c
index cec5b7553f28..afeca42da174 100644
--- a/drivers/media/pci/zoran/zoran_card.c
+++ b/drivers/media/pci/zoran/zoran_card.c
@@ -1049,8 +1049,9 @@ static int zr36057_init (struct zoran *zr)
/*
* Now add the template and register the device unit.
*/
- memcpy(zr->video_dev, &zoran_template, sizeof(zoran_template));
+ *zr->video_dev = zoran_template;
zr->video_dev->v4l2_dev = &zr->v4l2_dev;
+ zr->video_dev->lock = &zr->lock;
strcpy(zr->video_dev->name, ZR_DEVNAME(zr));
/* It's not a mem2mem device, but you can both capture and output from
one and the same device. This should really be split up into two
@@ -1220,8 +1221,7 @@ static int zoran_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
zr->id = nr;
snprintf(ZR_DEVNAME(zr), sizeof(ZR_DEVNAME(zr)), "MJPEG[%u]", zr->id);
spin_lock_init(&zr->spinlock);
- mutex_init(&zr->resource_lock);
- mutex_init(&zr->other_lock);
+ mutex_init(&zr->lock);
if (pci_enable_device(pdev))
goto zr_unreg;
zr->revision = zr->pci_dev->revision;