From c23e0cb81e4021b9712b1093d54713991fd9b7c2 Mon Sep 17 00:00:00 2001 From: Al Viro Date: Mon, 3 Jul 2017 03:02:56 -0400 Subject: media: annotate ->poll() instances Signed-off-by: Al Viro --- drivers/media/common/saa7146/saa7146_fops.c | 8 ++++---- drivers/media/common/siano/smsdvb-debugfs.c | 7 ++----- 2 files changed, 6 insertions(+), 9 deletions(-) (limited to 'drivers/media/common') diff --git a/drivers/media/common/saa7146/saa7146_fops.c b/drivers/media/common/saa7146/saa7146_fops.c index 8c87d6837c49..8ee3eebef4db 100644 --- a/drivers/media/common/saa7146/saa7146_fops.c +++ b/drivers/media/common/saa7146/saa7146_fops.c @@ -320,13 +320,13 @@ static int fops_mmap(struct file *file, struct vm_area_struct * vma) return res; } -static unsigned int __fops_poll(struct file *file, struct poll_table_struct *wait) +static __poll_t __fops_poll(struct file *file, struct poll_table_struct *wait) { struct video_device *vdev = video_devdata(file); struct saa7146_fh *fh = file->private_data; struct videobuf_buffer *buf = NULL; struct videobuf_queue *q; - unsigned int res = v4l2_ctrl_poll(file, wait); + __poll_t res = v4l2_ctrl_poll(file, wait); DEB_EE("file:%p, poll:%p\n", file, wait); @@ -359,10 +359,10 @@ static unsigned int __fops_poll(struct file *file, struct poll_table_struct *wai return res; } -static unsigned int fops_poll(struct file *file, struct poll_table_struct *wait) +static __poll_t fops_poll(struct file *file, struct poll_table_struct *wait) { struct video_device *vdev = video_devdata(file); - unsigned int res; + __poll_t res; mutex_lock(vdev->lock); res = __fops_poll(file, wait); diff --git a/drivers/media/common/siano/smsdvb-debugfs.c b/drivers/media/common/siano/smsdvb-debugfs.c index 1a8677ade391..0c0878bcf251 100644 --- a/drivers/media/common/siano/smsdvb-debugfs.c +++ b/drivers/media/common/siano/smsdvb-debugfs.c @@ -374,7 +374,7 @@ exit: return rc; } -static unsigned int smsdvb_stats_poll(struct file *file, poll_table *wait) +static __poll_t smsdvb_stats_poll(struct file *file, poll_table *wait) { struct smsdvb_debugfs *debug_data = file->private_data; int rc; @@ -384,12 +384,9 @@ static unsigned int smsdvb_stats_poll(struct file *file, poll_table *wait) poll_wait(file, &debug_data->stats_queue, wait); rc = smsdvb_stats_wait_read(debug_data); - if (rc > 0) - rc = POLLIN | POLLRDNORM; - kref_put(&debug_data->refcount, smsdvb_debugfs_data_release); - return rc; + return rc > 0 ? POLLIN | POLLRDNORM : 0; } static ssize_t smsdvb_stats_read(struct file *file, char __user *user_buf, -- cgit v1.2.3