aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/video/pxa_camera.c
diff options
context:
space:
mode:
authorGuennadi Liakhovetski <g.liakhovetski@pengutronix.de>2008-04-04 12:46:34 -0400
committerMauro Carvalho Chehab <mchehab@infradead.org>2008-04-24 13:07:57 -0400
commit1a0063a9852380190a7172c1a1cb79e934b06cd4 (patch)
tree71b91bdeaae1b72c3718507dec6922f609b9edd0 /drivers/media/video/pxa_camera.c
parentb8d9904c3525c0a149976ffaad48fcb03e8703f7 (diff)
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.c10
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,
803 return 0; 803 return 0;
804} 804}
805 805
806static spinlock_t *pxa_camera_spinlock_alloc(struct soc_camera_file *icf)
807{
808 struct soc_camera_host *ici =
809 to_soc_camera_host(icf->icd->dev.parent);
810 struct pxa_camera_dev *pcdev = ici->priv;
811
812 return &pcdev->lock;
813}
814
806static struct soc_camera_host_ops pxa_soc_camera_host_ops = { 815static struct soc_camera_host_ops pxa_soc_camera_host_ops = {
807 .owner = THIS_MODULE, 816 .owner = THIS_MODULE,
808 .add = pxa_camera_add_device, 817 .add = pxa_camera_add_device,
@@ -814,6 +823,7 @@ static struct soc_camera_host_ops pxa_soc_camera_host_ops = {
814 .querycap = pxa_camera_querycap, 823 .querycap = pxa_camera_querycap,
815 .try_bus_param = pxa_camera_try_bus_param, 824 .try_bus_param = pxa_camera_try_bus_param,
816 .set_bus_param = pxa_camera_set_bus_param, 825 .set_bus_param = pxa_camera_set_bus_param,
826 .spinlock_alloc = pxa_camera_spinlock_alloc,
817}; 827};
818 828
819/* Should be allocated dynamically too, but we have only one. */ 829/* Should be allocated dynamically too, but we have only one. */