summaryrefslogtreecommitdiffstats
path: root/drivers/media/video/davinci/vpif_capture.c
diff options
context:
space:
mode:
authorManjunath Hadli <manjunath.hadli@ti.com>2012-04-13 04:43:10 -0300
committerMauro Carvalho Chehab <mchehab@redhat.com>2012-07-30 18:59:50 -0300
commitb1fc42302b75bb9c4940317e3bf2f1e2efdb3a1a (patch)
tree934aef5be42746a192fa403d66324b4ec3b3f01d /drivers/media/video/davinci/vpif_capture.c
parent4099040eaaa4fe543c4e915b8cab51b1d843edee (diff)
downloadlinux-b1fc42302b75bb9c4940317e3bf2f1e2efdb3a1a.tar.bz2
[media] davinci: vpif: add check for genuine interrupts in the isr
As the same interrupt is shared between capture and display devices, sometimes we get isr calls where the interrupt might not genuinely belong to capture or display. Hence, add a condition in the isr to check for interrupt ownership and channel number to make sure we do not service wrong interrupts. Signed-off-by: Manjunath Hadli <manjunath.hadli@ti.com> Signed-off-by: Lad, Prabhakar <prabhakar.lad@ti.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media/video/davinci/vpif_capture.c')
-rw-r--r--drivers/media/video/davinci/vpif_capture.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/media/video/davinci/vpif_capture.c b/drivers/media/video/davinci/vpif_capture.c
index 96046957bf21..e01141234846 100644
--- a/drivers/media/video/davinci/vpif_capture.c
+++ b/drivers/media/video/davinci/vpif_capture.c
@@ -341,6 +341,9 @@ static irqreturn_t vpif_channel_isr(int irq, void *dev_id)
int fid = -1, i;
channel_id = *(int *)(dev_id);
+ if (!vpif_intr_status(channel_id))
+ return IRQ_NONE;
+
ch = dev->dev[channel_id];
field = ch->common[VPIF_VIDEO_INDEX].fmt.fmt.pix.field;