summaryrefslogtreecommitdiffstats
path: root/drivers/media/video/hdpvr
diff options
context:
space:
mode:
authorJanne Grunau <j@jannau.net>2009-03-26 20:29:39 -0300
committerMauro Carvalho Chehab <mchehab@redhat.com>2009-03-30 12:43:42 -0300
commitd211bfcbd0f13f1234aaa6e565013dba051a408c (patch)
treeba42e13e120c76bab8acc4dafa1dd6fd58ec163e /drivers/media/video/hdpvr
parent2ddacee6ebbbdd20af96663f96f5b4de6bff90cc (diff)
downloadop-kernel-dev-d211bfcbd0f13f1234aaa6e565013dba051a408c.zip
op-kernel-dev-d211bfcbd0f13f1234aaa6e565013dba051a408c.tar.gz
V4L/DVB (11228): hdpvr: use debugging macro for buffer status
Signed-off-by: Janne Grunau <j@jannau.net> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media/video/hdpvr')
-rw-r--r--drivers/media/video/hdpvr/hdpvr-video.c27
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 2359780..d63bfcc 100644
--- a/drivers/media/video/hdpvr/hdpvr-video.c
+++ b/drivers/media/video/hdpvr/hdpvr-video.c
@@ -28,6 +28,12 @@
#define BULK_URB_TIMEOUT 1250 /* 1.25 seconds */
+#define print_buffer_status() v4l2_dbg(MSG_BUFFER, hdpvr_debug, dev->video_dev,\
+ "%s:%d buffer stat: %d free, %d proc\n",\
+ __func__, __LINE__, \
+ list_size(&dev->free_buff_list), \
+ list_size(&dev->rec_buff_list))
+
struct hdpvr_fh {
struct hdpvr_device *dev;
};
@@ -191,10 +197,7 @@ static int hdpvr_submit_buffers(struct hdpvr_device *dev)
list_move_tail(&buf->buff_list, &dev->rec_buff_list);
}
err:
- v4l2_dbg(MSG_BUFFER, hdpvr_debug, dev->video_dev,
- "buffer queue stat: %d free, %d proc\n",
- list_size(&dev->free_buff_list),
- list_size(&dev->rec_buff_list));
+ print_buffer_status();
mutex_unlock(&dev->io_mutex);
return ret;
}
@@ -399,11 +402,7 @@ static ssize_t hdpvr_read(struct file *file, char __user *buffer, size_t count,
mutex_unlock(&dev->io_mutex);
goto err;
}
-
- v4l2_dbg(MSG_BUFFER, hdpvr_debug, dev->video_dev,
- "buffer queue stat: %d free, %d proc\n",
- list_size(&dev->free_buff_list),
- list_size(&dev->rec_buff_list));
+ print_buffer_status();
}
mutex_unlock(&dev->io_mutex);
@@ -463,10 +462,7 @@ static ssize_t hdpvr_read(struct file *file, char __user *buffer, size_t count,
list_move_tail(&buf->buff_list, &dev->free_buff_list);
- v4l2_dbg(MSG_BUFFER, hdpvr_debug, dev->video_dev,
- "buffer queue stat: %d free, %d proc\n",
- list_size(&dev->free_buff_list),
- list_size(&dev->rec_buff_list));
+ print_buffer_status();
mutex_unlock(&dev->io_mutex);
@@ -499,10 +495,7 @@ static unsigned int hdpvr_poll(struct file *filp, poll_table *wait)
dev->status = STATUS_IDLE;
}
- v4l2_dbg(MSG_BUFFER, hdpvr_debug, dev->video_dev,
- "buffer queue stat: %d free, %d proc\n",
- list_size(&dev->free_buff_list),
- list_size(&dev->rec_buff_list));
+ print_buffer_status();
}
mutex_unlock(&dev->io_mutex);
OpenPOWER on IntegriCloud