diff options
author | Guennadi Liakhovetski <g.liakhovetski@pengutronix.de> | 2008-04-04 20:46:34 +0400 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@infradead.org> | 2008-04-24 21:07:57 +0400 |
commit | 1a0063a9852380190a7172c1a1cb79e934b06cd4 (patch) | |
tree | 71b91bdeaae1b72c3718507dec6922f609b9edd0 /drivers/media/video/pxa_camera.c | |
parent | b8d9904c3525c0a149976ffaad48fcb03e8703f7 (diff) | |
download | linux-1a0063a9852380190a7172c1a1cb79e934b06cd4.tar.xz |
V4L/DVB (7501): soc-camera: use a spinlock for videobuffer queue
All drivers should provide a spinlock to be used in videobuf operations.
Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@pengutronix.de>
Reviewed-by: Brandon Philips <bphilips@suse.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Diffstat (limited to 'drivers/media/video/pxa_camera.c')
-rw-r--r-- | drivers/media/video/pxa_camera.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/drivers/media/video/pxa_camera.c b/drivers/media/video/pxa_camera.c index 9758f7eb5932..bef3c9c7902a 100644 --- a/drivers/media/video/pxa_camera.c +++ b/drivers/media/video/pxa_camera.c @@ -803,6 +803,15 @@ static int pxa_camera_querycap(struct soc_camera_host *ici, return 0; } +static spinlock_t *pxa_camera_spinlock_alloc(struct soc_camera_file *icf) +{ + struct soc_camera_host *ici = + to_soc_camera_host(icf->icd->dev.parent); + struct pxa_camera_dev *pcdev = ici->priv; + + return &pcdev->lock; +} + static struct soc_camera_host_ops pxa_soc_camera_host_ops = { .owner = THIS_MODULE, .add = pxa_camera_add_device, @@ -814,6 +823,7 @@ static struct soc_camera_host_ops pxa_soc_camera_host_ops = { .querycap = pxa_camera_querycap, .try_bus_param = pxa_camera_try_bus_param, .set_bus_param = pxa_camera_set_bus_param, + .spinlock_alloc = pxa_camera_spinlock_alloc, }; /* Should be allocated dynamically too, but we have only one. */ |