summaryrefslogtreecommitdiff
path: root/linux/drivers/media/video/ivtv/ivtv-streams.c
diff options
context:
space:
mode:
authorHans Verkuil <hverkuil@xs4all.nl>2007-07-29 20:22:05 +0200
committerHans Verkuil <hverkuil@xs4all.nl>2007-07-29 20:22:05 +0200
commitd9dfbb9adf32defc0309c29ce0267d28b7d5de38 (patch)
treeda64b86bab6dcea8fa0ed951fb8e4a7550a54f11 /linux/drivers/media/video/ivtv/ivtv-streams.c
parent4fcf11d4d6be97e5d2d4829f7a8af18205289d04 (diff)
downloadmediapointer-dvb-s2-d9dfbb9adf32defc0309c29ce0267d28b7d5de38.tar.gz
mediapointer-dvb-s2-d9dfbb9adf32defc0309c29ce0267d28b7d5de38.tar.bz2
ivtv: fix stop stream locking.
From: Hans Verkuil <hverkuil@xs4all.nl> Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Diffstat (limited to 'linux/drivers/media/video/ivtv/ivtv-streams.c')
-rw-r--r--linux/drivers/media/video/ivtv/ivtv-streams.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/linux/drivers/media/video/ivtv/ivtv-streams.c b/linux/drivers/media/video/ivtv/ivtv-streams.c
index d1cc366c2..4272fbc0b 100644
--- a/linux/drivers/media/video/ivtv/ivtv-streams.c
+++ b/linux/drivers/media/video/ivtv/ivtv-streams.c
@@ -751,6 +751,9 @@ int ivtv_stop_v4l2_encode_stream(struct ivtv_stream *s, int gop_end)
stopmode = 1;
}
+ /* ensure these actions are done only once */
+ mutex_lock(&itv->serialize_lock);
+
/* end_capture */
/* when: 0 = end of GOP 1 = NOW!, type: 0 = mpeg, subtype: 3 = video+audio */
ivtv_vapi(itv, CX2341X_ENC_STOP_CAPTURE, 3, stopmode, cap_type, s->subtype);
@@ -803,9 +806,6 @@ int ivtv_stop_v4l2_encode_stream(struct ivtv_stream *s, int gop_end)
/* Clear capture and no-read bits */
clear_bit(IVTV_F_S_STREAMING, &s->s_flags);
- /* ensure these global cleanup actions are done only once */
- mutex_lock(&itv->serialize_lock);
-
if (s->type == IVTV_ENC_STREAM_TYPE_VBI)
ivtv_set_irq_mask(itv, IVTV_IRQ_ENC_VBI_CAP);