From 57fc8eb19adc794e0d267b241561c8211a50d2a8 Mon Sep 17 00:00:00 2001 From: Hans Verkuil Date: Mon, 3 Mar 2014 06:47:38 -0300 Subject: [PATCH] [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 --- drivers/media/v4l2-core/v4l2-dev.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/media/v4l2-core/v4l2-dev.c b/drivers/media/v4l2-core/v4l2-dev.c index fbe45b83a166..33617c365acc 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; -- 2.39.5