From ffad9a41a29cb60dc7a996460fbeb855be55d58e Mon Sep 17 00:00:00 2001 From: Mauro Carvalho Chehab Date: Thu, 2 Jul 2009 17:07:32 -0300 Subject: [PATCH] --- yaml --- r: 161417 b: refs/heads/master c: d33fbcbb21ba53358ba8a83765cfd1401e06d883 h: refs/heads/master i: 161415: 7834003b475f22f66a115bb0d21dbe87cc4c4358 v: v3 --- [refs] | 2 +- trunk/drivers/media/video/v4l2-ioctl.c | 14 ++++++++++---- 2 files changed, 11 insertions(+), 5 deletions(-) diff --git a/[refs] b/[refs] index 7feeb0e655ba..306f1e715454 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: d1afe4250a0aecf7ee92fa3d563a2f2aabf6cc0b +refs/heads/master: d33fbcbb21ba53358ba8a83765cfd1401e06d883 diff --git a/trunk/drivers/media/video/v4l2-ioctl.c b/trunk/drivers/media/video/v4l2-ioctl.c index aa8f66c63364..c32e67608ad4 100644 --- a/trunk/drivers/media/video/v4l2-ioctl.c +++ b/trunk/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;