summaryrefslogtreecommitdiff
path: root/drivers/media
diff options
context:
space:
mode:
authorHans Verkuil <hans.verkuil@cisco.com>2016-09-05 16:09:17 +0300
committerMauro Carvalho Chehab <mchehab@s-opensource.com>2016-09-06 22:45:06 +0300
commite5872251cdf59ad284eb7ebb5960208d1753d9d8 (patch)
tree4023d96bcda03dc297c861b32aad343b05b6d80f /drivers/media
parent9d29327d16d5add499f106c693d7ad89c9e52c22 (diff)
downloadlinux-e5872251cdf59ad284eb7ebb5960208d1753d9d8.tar.xz
[media] Revert "[media] tw5864: remove double irq lock code"
This reverts commit 617e901a12ad ("[media] tw5864: remove double irq lock code"). That commit was rejected by Andrey Utkin <andrey_utkin@fastmail.com>, but it had already been merged. Revert and apply Andrey's corrected patch next. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
Diffstat (limited to 'drivers/media')
-rw-r--r--drivers/media/pci/tw5864/tw5864-core.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/media/pci/tw5864/tw5864-core.c b/drivers/media/pci/tw5864/tw5864-core.c
index e3d884e963c0..440cd7bb8d04 100644
--- a/drivers/media/pci/tw5864/tw5864-core.c
+++ b/drivers/media/pci/tw5864/tw5864-core.c
@@ -157,10 +157,12 @@ static void tw5864_h264_isr(struct tw5864_dev *dev)
cur_frame = next_frame;
+ spin_lock_irqsave(&input->slock, flags);
input->frame_seqno++;
input->frame_gop_seqno++;
if (input->frame_gop_seqno >= input->gop)
input->frame_gop_seqno = 0;
+ spin_unlock_irqrestore(&input->slock, flags);
} else {
dev_err(&dev->pci->dev,
"Skipped frame on input %d because all buffers busy\n",