aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/video/v4l2-ioctl.c
diff options
context:
space:
mode:
authorMauro Carvalho Chehab <mchehab@redhat.com>2009-07-02 16:07:32 -0400
committerMauro Carvalho Chehab <mchehab@redhat.com>2009-09-12 11:17:17 -0400
commitd33fbcbb21ba53358ba8a83765cfd1401e06d883 (patch)
tree5756b5ef9e7f30105a9c9895d68fdd2dd70a897e /drivers/media/video/v4l2-ioctl.c
parentd1afe4250a0aecf7ee92fa3d563a2f2aabf6cc0b (diff)
V4L/DVB (12168): v4l2-ioctl: avoid flooding log with unasked debug messages
Thanks to Hans Verkuil <hverkuil@xs4all.nl> for pointing this issue on my last patch. Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media/video/v4l2-ioctl.c')
-rw-r--r--drivers/media/video/v4l2-ioctl.c14
1 files changed, 10 insertions, 4 deletions
diff --git a/drivers/media/video/v4l2-ioctl.c b/drivers/media/video/v4l2-ioctl.c
index aa8f66c63364..c32e67608ad4 100644
--- a/drivers/media/video/v4l2-ioctl.c
+++ b/drivers/media/video/v4l2-ioctl.c
@@ -42,6 +42,12 @@
42 printk(KERN_DEBUG "%s: " fmt, vfd->name, ## arg);\ 42 printk(KERN_DEBUG "%s: " fmt, vfd->name, ## arg);\
43 } while (0) 43 } while (0)
44 44
45#define dbgarg3(fmt, arg...) \
46 do { \
47 if (vfd->debug & V4L2_DEBUG_IOCTL_ARG) \
48 printk(KERN_CONT "%s: " fmt, vfd->name, ## arg);\
49 } while (0)
50
45/* Zero out the end of the struct pointed to by p. Everthing after, but 51/* Zero out the end of the struct pointed to by p. Everthing after, but
46 * not including, the specified field is cleared. */ 52 * not including, the specified field is cleared. */
47#define CLEAR_AFTER_FIELD(p, field) \ 53#define CLEAR_AFTER_FIELD(p, field) \
@@ -1735,20 +1741,20 @@ static long __video_do_ioctl(struct file *file,
1735 p->type); 1741 p->type);
1736 switch (p->type) { 1742 switch (p->type) {
1737 case V4L2_FRMSIZE_TYPE_DISCRETE: 1743 case V4L2_FRMSIZE_TYPE_DISCRETE:
1738 printk("width = %d, height=%d\n", 1744 dbgarg3("width = %d, height=%d\n",
1739 p->discrete.width, p->discrete.height); 1745 p->discrete.width, p->discrete.height);
1740 break; 1746 break;
1741 case V4L2_FRMSIZE_TYPE_STEPWISE: 1747 case V4L2_FRMSIZE_TYPE_STEPWISE:
1742 printk("min %dx%d, max %dx%d, step %dx%d\n", 1748 dbgarg3("min %dx%d, max %dx%d, step %dx%d\n",
1743 p->stepwise.min_width, p->stepwise.min_height, 1749 p->stepwise.min_width, p->stepwise.min_height,
1744 p->stepwise.step_width, p->stepwise.step_height, 1750 p->stepwise.step_width, p->stepwise.step_height,
1745 p->stepwise.max_width, p->stepwise.max_height); 1751 p->stepwise.max_width, p->stepwise.max_height);
1746 break; 1752 break;
1747 case V4L2_FRMSIZE_TYPE_CONTINUOUS: 1753 case V4L2_FRMSIZE_TYPE_CONTINUOUS:
1748 printk("continuous\n"); 1754 dbgarg3("continuous\n");
1749 break; 1755 break;
1750 default: 1756 default:
1751 printk("- Unknown type!\n"); 1757 dbgarg3("- Unknown type!\n");
1752 } 1758 }
1753 1759
1754 break; 1760 break;