diff options
author | Hans Verkuil <hverkuil@xs4all.nl> | 2007-07-29 14:22:05 -0400 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@infradead.org> | 2007-10-09 21:05:36 -0400 |
commit | de870b52be9d52c3dad76c9ea7399cb94abcaa1a (patch) | |
tree | 4fe9ea0a2eff13fd962a984bebc23f1c3a3b76e4 | |
parent | 37093b1ea600d84fbf7252baf12eedec85ae40f1 (diff) |
V4L/DVB (6048): ivtv: fix stop stream locking
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
-rw-r--r-- | drivers/media/video/ivtv/ivtv-streams.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/media/video/ivtv/ivtv-streams.c b/drivers/media/video/ivtv/ivtv-streams.c index d1cc366c2a35..4272fbc0bc8b 100644 --- a/drivers/media/video/ivtv/ivtv-streams.c +++ b/drivers/media/video/ivtv/ivtv-streams.c | |||
@@ -751,6 +751,9 @@ int ivtv_stop_v4l2_encode_stream(struct ivtv_stream *s, int gop_end) | |||
751 | stopmode = 1; | 751 | stopmode = 1; |
752 | } | 752 | } |
753 | 753 | ||
754 | /* ensure these actions are done only once */ | ||
755 | mutex_lock(&itv->serialize_lock); | ||
756 | |||
754 | /* end_capture */ | 757 | /* end_capture */ |
755 | /* when: 0 = end of GOP 1 = NOW!, type: 0 = mpeg, subtype: 3 = video+audio */ | 758 | /* when: 0 = end of GOP 1 = NOW!, type: 0 = mpeg, subtype: 3 = video+audio */ |
756 | ivtv_vapi(itv, CX2341X_ENC_STOP_CAPTURE, 3, stopmode, cap_type, s->subtype); | 759 | 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) | |||
803 | /* Clear capture and no-read bits */ | 806 | /* Clear capture and no-read bits */ |
804 | clear_bit(IVTV_F_S_STREAMING, &s->s_flags); | 807 | clear_bit(IVTV_F_S_STREAMING, &s->s_flags); |
805 | 808 | ||
806 | /* ensure these global cleanup actions are done only once */ | ||
807 | mutex_lock(&itv->serialize_lock); | ||
808 | |||
809 | if (s->type == IVTV_ENC_STREAM_TYPE_VBI) | 809 | if (s->type == IVTV_ENC_STREAM_TYPE_VBI) |
810 | ivtv_set_irq_mask(itv, IVTV_IRQ_ENC_VBI_CAP); | 810 | ivtv_set_irq_mask(itv, IVTV_IRQ_ENC_VBI_CAP); |
811 | 811 | ||