media: v4l2-dev.c: show which events are requested by poll()
authorHans Verkuil <hverkuil-cisco@xs4all.nl>
Thu, 11 Mar 2021 13:05:38 +0000 (14:05 +0100)
committerMauro Carvalho Chehab <mchehab+huawei@kernel.org>
Mon, 22 Mar 2021 10:54:31 +0000 (11:54 +0100)
This helps debugging poll problems.

Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
drivers/media/v4l2-core/v4l2-dev.c

index b6a72d2..7d0edf3 100644 (file)
@@ -350,8 +350,9 @@ static __poll_t v4l2_poll(struct file *filp, struct poll_table_struct *poll)
                        res = vdev->fops->poll(filp, poll);
        }
        if (vdev->dev_debug & V4L2_DEV_DEBUG_POLL)
-               dprintk("%s: poll: %08x\n",
-                       video_device_node_name(vdev), res);
+               dprintk("%s: poll: %08x %08x\n",
+                       video_device_node_name(vdev), res,
+                       poll_requested_events(poll));
        return res;
 }