aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJavier Martin <javier.martin@vista-silicon.com>2012-02-13 08:51:52 -0500
committerMauro Carvalho Chehab <mchehab@redhat.com>2012-03-08 07:44:00 -0500
commit8636ead8b2d738b5b1b9a0c2e6070e3458a47d14 (patch)
tree69e987b902a66911c89739e242efd86417ddfe71
parenta654ba16fdbad8ffb5a6c0dd5098c6651bde08b5 (diff)
[media] media: i.MX27 camera: Use spin_lock() inside the IRQ handler
We don't need to use spin_lock_irqsave() since there are not any other IRQs that can race with this ISR. Signed-off-by: Javier Martin <javier.martin@vista-silicon.com> Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
-rw-r--r--drivers/media/video/mx2_camera.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/drivers/media/video/mx2_camera.c b/drivers/media/video/mx2_camera.c
index 2d1941435786..d555b6eccb82 100644
--- a/drivers/media/video/mx2_camera.c
+++ b/drivers/media/video/mx2_camera.c
@@ -1286,9 +1286,8 @@ static irqreturn_t mx27_camera_emma_irq(int irq_emma, void *data)
1286 struct mx2_camera_dev *pcdev = data; 1286 struct mx2_camera_dev *pcdev = data;
1287 unsigned int status = readl(pcdev->base_emma + PRP_INTRSTATUS); 1287 unsigned int status = readl(pcdev->base_emma + PRP_INTRSTATUS);
1288 struct mx2_buffer *buf; 1288 struct mx2_buffer *buf;
1289 unsigned long flags;
1290 1289
1291 spin_lock_irqsave(&pcdev->lock, flags); 1290 spin_lock(&pcdev->lock);
1292 1291
1293 if (list_empty(&pcdev->active_bufs)) { 1292 if (list_empty(&pcdev->active_bufs)) {
1294 dev_warn(pcdev->dev, "%s: called while active list is empty\n", 1293 dev_warn(pcdev->dev, "%s: called while active list is empty\n",
@@ -1325,7 +1324,7 @@ static irqreturn_t mx27_camera_emma_irq(int irq_emma, void *data)
1325 } 1324 }
1326 1325
1327irq_ok: 1326irq_ok:
1328 spin_unlock_irqrestore(&pcdev->lock, flags); 1327 spin_unlock(&pcdev->lock);
1329 writel(status, pcdev->base_emma + PRP_INTRSTATUS); 1328 writel(status, pcdev->base_emma + PRP_INTRSTATUS);
1330 1329
1331 return IRQ_HANDLED; 1330 return IRQ_HANDLED;