diff options
-rw-r--r-- | drivers/media/video/pvrusb2/pvrusb2-context.c | 11 | ||||
-rw-r--r-- | drivers/media/video/pvrusb2/pvrusb2-context.h | 2 |
2 files changed, 13 insertions, 0 deletions
diff --git a/drivers/media/video/pvrusb2/pvrusb2-context.c b/drivers/media/video/pvrusb2/pvrusb2-context.c index cf129746205d..69786cdaa859 100644 --- a/drivers/media/video/pvrusb2/pvrusb2-context.c +++ b/drivers/media/video/pvrusb2/pvrusb2-context.c | |||
@@ -188,6 +188,17 @@ void pvr2_channel_done(struct pvr2_channel *cp) | |||
188 | } | 188 | } |
189 | 189 | ||
190 | 190 | ||
191 | int pvr2_channel_check_stream_no_lock(struct pvr2_channel *cp, | ||
192 | struct pvr2_context_stream *sp) | ||
193 | { | ||
194 | if (sp == cp->stream) return 0; | ||
195 | if (sp->user) { | ||
196 | return -EBUSY; | ||
197 | } | ||
198 | return 0; | ||
199 | } | ||
200 | |||
201 | |||
191 | int pvr2_channel_claim_stream(struct pvr2_channel *cp, | 202 | int pvr2_channel_claim_stream(struct pvr2_channel *cp, |
192 | struct pvr2_context_stream *sp) | 203 | struct pvr2_context_stream *sp) |
193 | { | 204 | { |
diff --git a/drivers/media/video/pvrusb2/pvrusb2-context.h b/drivers/media/video/pvrusb2/pvrusb2-context.h index 6327fa1f7e4f..4d0f4ad64122 100644 --- a/drivers/media/video/pvrusb2/pvrusb2-context.h +++ b/drivers/media/video/pvrusb2/pvrusb2-context.h | |||
@@ -76,6 +76,8 @@ void pvr2_channel_init(struct pvr2_channel *,struct pvr2_context *); | |||
76 | void pvr2_channel_done(struct pvr2_channel *); | 76 | void pvr2_channel_done(struct pvr2_channel *); |
77 | int pvr2_channel_claim_stream(struct pvr2_channel *, | 77 | int pvr2_channel_claim_stream(struct pvr2_channel *, |
78 | struct pvr2_context_stream *); | 78 | struct pvr2_context_stream *); |
79 | int pvr2_channel_check_stream_no_lock(struct pvr2_channel *, | ||
80 | struct pvr2_context_stream *); | ||
79 | struct pvr2_ioread *pvr2_channel_create_mpeg_stream( | 81 | struct pvr2_ioread *pvr2_channel_create_mpeg_stream( |
80 | struct pvr2_context_stream *); | 82 | struct pvr2_context_stream *); |
81 | 83 | ||