Skip to content

Commit

Permalink
[media] media: i.MX27 camera: Use spin_lock() inside the IRQ handler
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Javier Martin authored and Mauro Carvalho Chehab committed Mar 8, 2012
1 parent a654ba1 commit 8636ead
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions drivers/media/video/mx2_camera.c
Original file line number Diff line number Diff line change
Expand Up @@ -1286,9 +1286,8 @@ static irqreturn_t mx27_camera_emma_irq(int irq_emma, void *data)
struct mx2_camera_dev *pcdev = data;
unsigned int status = readl(pcdev->base_emma + PRP_INTRSTATUS);
struct mx2_buffer *buf;
unsigned long flags;

spin_lock_irqsave(&pcdev->lock, flags);
spin_lock(&pcdev->lock);

if (list_empty(&pcdev->active_bufs)) {
dev_warn(pcdev->dev, "%s: called while active list is empty\n",
Expand Down Expand Up @@ -1325,7 +1324,7 @@ static irqreturn_t mx27_camera_emma_irq(int irq_emma, void *data)
}

irq_ok:
spin_unlock_irqrestore(&pcdev->lock, flags);
spin_unlock(&pcdev->lock);
writel(status, pcdev->base_emma + PRP_INTRSTATUS);

return IRQ_HANDLED;
Expand Down

0 comments on commit 8636ead

Please sign in to comment.