From: Hans Verkuil Date: Mon, 3 Mar 2014 09:47:38 +0000 (-0300) Subject: [media] v4l2-dev: don't debug poll unless the debug level > 2 X-Git-Tag: v3.17-rc1~112^2~290 X-Git-Url: https://openfabrics.org/gitweb/?a=commitdiff_plain;h=57fc8eb19adc794e0d267b241561c8211a50d2a8;p=~emulex%2Finfiniband.git [media] v4l2-dev: don't debug poll unless the debug level > 2 Some applications poll a lot, so prevent the poll message from flooding the log. Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab --- diff --git a/drivers/media/v4l2-core/v4l2-dev.c b/drivers/media/v4l2-core/v4l2-dev.c index fbe45b83a16..33617c365ac 100644 --- a/drivers/media/v4l2-core/v4l2-dev.c +++ b/drivers/media/v4l2-core/v4l2-dev.c @@ -335,7 +335,7 @@ static unsigned int v4l2_poll(struct file *filp, struct poll_table_struct *poll) return DEFAULT_POLLMASK; if (video_is_registered(vdev)) res = vdev->fops->poll(filp, poll); - if (vdev->debug) + if (vdev->debug > 2) printk(KERN_DEBUG "%s: poll: %08x\n", video_device_node_name(vdev), res); return res;