[media] v4l2-dev: don't debug poll unless the debug level > 2
authorHans Verkuil <hans.verkuil@cisco.com>
Mon, 3 Mar 2014 09:47:38 +0000 (06:47 -0300)
committerMauro Carvalho Chehab <m.chehab@samsung.com>
Thu, 17 Jul 2014 21:30:36 +0000 (18:30 -0300)
Some applications poll a lot, so prevent the poll message from flooding
the log.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
drivers/media/v4l2-core/v4l2-dev.c

index fbe45b83a166d1bdaa5048c9d6ac1a5fabe6e16a..33617c365accfeebb127d094e9da1da39fe691de 100644 (file)
@@ -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;