aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/video/pvrusb2/pvrusb2-io.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/media/video/pvrusb2/pvrusb2-io.c')
-rw-r--r--drivers/media/video/pvrusb2/pvrusb2-io.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/drivers/media/video/pvrusb2/pvrusb2-io.c b/drivers/media/video/pvrusb2/pvrusb2-io.c
index c032777a977f..681f79c8064e 100644
--- a/drivers/media/video/pvrusb2/pvrusb2-io.c
+++ b/drivers/media/video/pvrusb2/pvrusb2-io.c
@@ -116,8 +116,8 @@ static void pvr2_buffer_describe(struct pvr2_buffer *bp,const char *msg)
116 (bp ? pvr2_buffer_state_decode(bp->state) : "(invalid)"), 116 (bp ? pvr2_buffer_state_decode(bp->state) : "(invalid)"),
117 (bp ? bp->id : 0), 117 (bp ? bp->id : 0),
118 (bp ? bp->status : 0), 118 (bp ? bp->status : 0),
119 (bp ? bp->stream : 0), 119 (bp ? bp->stream : NULL),
120 (bp ? bp->purb : 0), 120 (bp ? bp->purb : NULL),
121 (bp ? bp->signature : 0)); 121 (bp ? bp->signature : 0));
122} 122}
123#endif /* SANITY_CHECK_BUFFERS */ 123#endif /* SANITY_CHECK_BUFFERS */
@@ -286,7 +286,7 @@ static void pvr2_buffer_done(struct pvr2_buffer *bp)
286 pvr2_buffer_wipe(bp); 286 pvr2_buffer_wipe(bp);
287 pvr2_buffer_set_none(bp); 287 pvr2_buffer_set_none(bp);
288 bp->signature = 0; 288 bp->signature = 0;
289 bp->stream = 0; 289 bp->stream = NULL;
290 if (bp->purb) usb_free_urb(bp->purb); 290 if (bp->purb) usb_free_urb(bp->purb);
291 pvr2_trace(PVR2_TRACE_BUF_POOL,"/*---TRACE_FLOW---*/" 291 pvr2_trace(PVR2_TRACE_BUF_POOL,"/*---TRACE_FLOW---*/"
292 " bufferDone %p",bp); 292 " bufferDone %p",bp);
@@ -341,13 +341,13 @@ static int pvr2_stream_buffer_count(struct pvr2_stream *sp,unsigned int cnt)
341 struct pvr2_buffer *bp; 341 struct pvr2_buffer *bp;
342 bp = sp->buffers[sp->buffer_total_count - 1]; 342 bp = sp->buffers[sp->buffer_total_count - 1];
343 /* Paranoia */ 343 /* Paranoia */
344 sp->buffers[sp->buffer_total_count - 1] = 0; 344 sp->buffers[sp->buffer_total_count - 1] = NULL;
345 (sp->buffer_total_count)--; 345 (sp->buffer_total_count)--;
346 pvr2_buffer_done(bp); 346 pvr2_buffer_done(bp);
347 kfree(bp); 347 kfree(bp);
348 } 348 }
349 if (scnt < sp->buffer_slot_count) { 349 if (scnt < sp->buffer_slot_count) {
350 struct pvr2_buffer **nb = 0; 350 struct pvr2_buffer **nb = NULL;
351 if (scnt) { 351 if (scnt) {
352 nb = kmalloc(scnt * sizeof(*nb),GFP_KERNEL); 352 nb = kmalloc(scnt * sizeof(*nb),GFP_KERNEL);
353 if (!nb) return -ENOMEM; 353 if (!nb) return -ENOMEM;
@@ -530,21 +530,21 @@ int pvr2_stream_set_buffer_count(struct pvr2_stream *sp,unsigned int cnt)
530struct pvr2_buffer *pvr2_stream_get_idle_buffer(struct pvr2_stream *sp) 530struct pvr2_buffer *pvr2_stream_get_idle_buffer(struct pvr2_stream *sp)
531{ 531{
532 struct list_head *lp = sp->idle_list.next; 532 struct list_head *lp = sp->idle_list.next;
533 if (lp == &sp->idle_list) return 0; 533 if (lp == &sp->idle_list) return NULL;
534 return list_entry(lp,struct pvr2_buffer,list_overhead); 534 return list_entry(lp,struct pvr2_buffer,list_overhead);
535} 535}
536 536
537struct pvr2_buffer *pvr2_stream_get_ready_buffer(struct pvr2_stream *sp) 537struct pvr2_buffer *pvr2_stream_get_ready_buffer(struct pvr2_stream *sp)
538{ 538{
539 struct list_head *lp = sp->ready_list.next; 539 struct list_head *lp = sp->ready_list.next;
540 if (lp == &sp->ready_list) return 0; 540 if (lp == &sp->ready_list) return NULL;
541 return list_entry(lp,struct pvr2_buffer,list_overhead); 541 return list_entry(lp,struct pvr2_buffer,list_overhead);
542} 542}
543 543
544struct pvr2_buffer *pvr2_stream_get_buffer(struct pvr2_stream *sp,int id) 544struct pvr2_buffer *pvr2_stream_get_buffer(struct pvr2_stream *sp,int id)
545{ 545{
546 if (id < 0) return 0; 546 if (id < 0) return NULL;
547 if (id >= sp->buffer_total_count) return 0; 547 if (id >= sp->buffer_total_count) return NULL;
548 return sp->buffers[id]; 548 return sp->buffers[id];
549} 549}
550 550