diff options
-rw-r--r-- | drivers/media/video/hdpvr/hdpvr-video.c | 27 |
1 files changed, 10 insertions, 17 deletions
diff --git a/drivers/media/video/hdpvr/hdpvr-video.c b/drivers/media/video/hdpvr/hdpvr-video.c index 235978003e68..d63bfccf784e 100644 --- a/drivers/media/video/hdpvr/hdpvr-video.c +++ b/drivers/media/video/hdpvr/hdpvr-video.c | |||
@@ -28,6 +28,12 @@ | |||
28 | 28 | ||
29 | #define BULK_URB_TIMEOUT 1250 /* 1.25 seconds */ | 29 | #define BULK_URB_TIMEOUT 1250 /* 1.25 seconds */ |
30 | 30 | ||
31 | #define print_buffer_status() v4l2_dbg(MSG_BUFFER, hdpvr_debug, dev->video_dev,\ | ||
32 | "%s:%d buffer stat: %d free, %d proc\n",\ | ||
33 | __func__, __LINE__, \ | ||
34 | list_size(&dev->free_buff_list), \ | ||
35 | list_size(&dev->rec_buff_list)) | ||
36 | |||
31 | struct hdpvr_fh { | 37 | struct hdpvr_fh { |
32 | struct hdpvr_device *dev; | 38 | struct hdpvr_device *dev; |
33 | }; | 39 | }; |
@@ -191,10 +197,7 @@ static int hdpvr_submit_buffers(struct hdpvr_device *dev) | |||
191 | list_move_tail(&buf->buff_list, &dev->rec_buff_list); | 197 | list_move_tail(&buf->buff_list, &dev->rec_buff_list); |
192 | } | 198 | } |
193 | err: | 199 | err: |
194 | v4l2_dbg(MSG_BUFFER, hdpvr_debug, dev->video_dev, | 200 | print_buffer_status(); |
195 | "buffer queue stat: %d free, %d proc\n", | ||
196 | list_size(&dev->free_buff_list), | ||
197 | list_size(&dev->rec_buff_list)); | ||
198 | mutex_unlock(&dev->io_mutex); | 201 | mutex_unlock(&dev->io_mutex); |
199 | return ret; | 202 | return ret; |
200 | } | 203 | } |
@@ -399,11 +402,7 @@ static ssize_t hdpvr_read(struct file *file, char __user *buffer, size_t count, | |||
399 | mutex_unlock(&dev->io_mutex); | 402 | mutex_unlock(&dev->io_mutex); |
400 | goto err; | 403 | goto err; |
401 | } | 404 | } |
402 | 405 | print_buffer_status(); | |
403 | v4l2_dbg(MSG_BUFFER, hdpvr_debug, dev->video_dev, | ||
404 | "buffer queue stat: %d free, %d proc\n", | ||
405 | list_size(&dev->free_buff_list), | ||
406 | list_size(&dev->rec_buff_list)); | ||
407 | } | 406 | } |
408 | mutex_unlock(&dev->io_mutex); | 407 | mutex_unlock(&dev->io_mutex); |
409 | 408 | ||
@@ -463,10 +462,7 @@ static ssize_t hdpvr_read(struct file *file, char __user *buffer, size_t count, | |||
463 | 462 | ||
464 | list_move_tail(&buf->buff_list, &dev->free_buff_list); | 463 | list_move_tail(&buf->buff_list, &dev->free_buff_list); |
465 | 464 | ||
466 | v4l2_dbg(MSG_BUFFER, hdpvr_debug, dev->video_dev, | 465 | print_buffer_status(); |
467 | "buffer queue stat: %d free, %d proc\n", | ||
468 | list_size(&dev->free_buff_list), | ||
469 | list_size(&dev->rec_buff_list)); | ||
470 | 466 | ||
471 | mutex_unlock(&dev->io_mutex); | 467 | mutex_unlock(&dev->io_mutex); |
472 | 468 | ||
@@ -499,10 +495,7 @@ static unsigned int hdpvr_poll(struct file *filp, poll_table *wait) | |||
499 | dev->status = STATUS_IDLE; | 495 | dev->status = STATUS_IDLE; |
500 | } | 496 | } |
501 | 497 | ||
502 | v4l2_dbg(MSG_BUFFER, hdpvr_debug, dev->video_dev, | 498 | print_buffer_status(); |
503 | "buffer queue stat: %d free, %d proc\n", | ||
504 | list_size(&dev->free_buff_list), | ||
505 | list_size(&dev->rec_buff_list)); | ||
506 | } | 499 | } |
507 | mutex_unlock(&dev->io_mutex); | 500 | mutex_unlock(&dev->io_mutex); |
508 | 501 | ||