The patch number 11228 was added via Janne Grunau <[email protected]>
to http://linuxtv.org/hg/v4l-dvb master development tree.

Kernel patches in this development tree may be modified to be backward
compatible with older kernels. Compatibility modifications will be
removed before inclusion into the mainstream Kernel

If anyone has any objections, please let us know by sending a message to:
        Linux Media Mailing List <[email protected]>

------

From: Janne Grunau  <[email protected]>
hdpvr: use debugging macro for buffer status


Priority: normal

Signed-off-by: Janne Grunau <[email protected]>


---

 linux/drivers/media/video/hdpvr/hdpvr-video.c |   27 ++++++------------
 1 file changed, 10 insertions(+), 17 deletions(-)

diff -r 55df63b82fef -r 1b125b336e11 
linux/drivers/media/video/hdpvr/hdpvr-video.c
--- a/linux/drivers/media/video/hdpvr/hdpvr-video.c     Thu Mar 26 09:13:40 
2009 +0100
+++ b/linux/drivers/media/video/hdpvr/hdpvr-video.c     Fri Mar 27 00:29:39 
2009 +0100
@@ -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 h
                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 *f
                        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 *f
 
                        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 fi
                        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);
 


---

Patch is available at: 
http://linuxtv.org/hg/v4l-dvb/rev/1b125b336e11e489ba16830b598e745f3e0e89ef

_______________________________________________
linuxtv-commits mailing list
[email protected]
http://www.linuxtv.org/cgi-bin/mailman/listinfo/linuxtv-commits

Reply via email to