diff options
author | Mauro Carvalho Chehab <mchehab@redhat.com> | 2009-07-02 17:07:32 -0300 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2009-09-12 12:17:17 -0300 |
commit | d33fbcbb21ba53358ba8a83765cfd1401e06d883 (patch) | |
tree | 5756b5ef9e7f30105a9c9895d68fdd2dd70a897e /drivers/media/video/v4l2-ioctl.c | |
parent | d1afe4250a0aecf7ee92fa3d563a2f2aabf6cc0b (diff) | |
download | blackbird-op-linux-d33fbcbb21ba53358ba8a83765cfd1401e06d883.tar.gz blackbird-op-linux-d33fbcbb21ba53358ba8a83765cfd1401e06d883.zip |
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.c | 14 |
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 @@ printk(KERN_DEBUG "%s: " fmt, vfd->name, ## arg);\ } while (0) +#define dbgarg3(fmt, arg...) \ + do { \ + if (vfd->debug & V4L2_DEBUG_IOCTL_ARG) \ + printk(KERN_CONT "%s: " fmt, vfd->name, ## arg);\ + } while (0) + /* Zero out the end of the struct pointed to by p. Everthing after, but * not including, the specified field is cleared. */ #define CLEAR_AFTER_FIELD(p, field) \ @@ -1735,20 +1741,20 @@ static long __video_do_ioctl(struct file *file, p->type); switch (p->type) { case V4L2_FRMSIZE_TYPE_DISCRETE: - printk("width = %d, height=%d\n", + dbgarg3("width = %d, height=%d\n", p->discrete.width, p->discrete.height); break; case V4L2_FRMSIZE_TYPE_STEPWISE: - printk("min %dx%d, max %dx%d, step %dx%d\n", + dbgarg3("min %dx%d, max %dx%d, step %dx%d\n", p->stepwise.min_width, p->stepwise.min_height, p->stepwise.step_width, p->stepwise.step_height, p->stepwise.max_width, p->stepwise.max_height); break; case V4L2_FRMSIZE_TYPE_CONTINUOUS: - printk("continuous\n"); + dbgarg3("continuous\n"); break; default: - printk("- Unknown type!\n"); + dbgarg3("- Unknown type!\n"); } break; |