summaryrefslogtreecommitdiff
path: root/linux/drivers/media/video
diff options
context:
space:
mode:
Diffstat (limited to 'linux/drivers/media/video')
-rw-r--r--linux/drivers/media/video/pvrusb2/pvrusb2-context.c11
-rw-r--r--linux/drivers/media/video/pvrusb2/pvrusb2-context.h2
2 files changed, 13 insertions, 0 deletions
diff --git a/linux/drivers/media/video/pvrusb2/pvrusb2-context.c b/linux/drivers/media/video/pvrusb2/pvrusb2-context.c
index 19787dc81..6ad1ce7dc 100644
--- a/linux/drivers/media/video/pvrusb2/pvrusb2-context.c
+++ b/linux/drivers/media/video/pvrusb2/pvrusb2-context.c
@@ -205,6 +205,17 @@ void pvr2_channel_done(struct pvr2_channel *cp)
}
+int pvr2_channel_check_stream_no_lock(struct pvr2_channel *cp,
+ struct pvr2_context_stream *sp)
+{
+ if (sp == cp->stream) return 0;
+ if (sp->user) {
+ return -EBUSY;
+ }
+ return 0;
+}
+
+
int pvr2_channel_claim_stream(struct pvr2_channel *cp,
struct pvr2_context_stream *sp)
{
diff --git a/linux/drivers/media/video/pvrusb2/pvrusb2-context.h b/linux/drivers/media/video/pvrusb2/pvrusb2-context.h
index 69c1f3a92..5e960ae51 100644
--- a/linux/drivers/media/video/pvrusb2/pvrusb2-context.h
+++ b/linux/drivers/media/video/pvrusb2/pvrusb2-context.h
@@ -85,6 +85,8 @@ void pvr2_channel_init(struct pvr2_channel *,struct pvr2_context *);
void pvr2_channel_done(struct pvr2_channel *);
int pvr2_channel_claim_stream(struct pvr2_channel *,
struct pvr2_context_stream *);
+int pvr2_channel_check_stream_no_lock(struct pvr2_channel *,
+ struct pvr2_context_stream *);
struct pvr2_ioread *pvr2_channel_create_mpeg_stream(
struct pvr2_context_stream *);