Skip to content

Commit c23e0cb

Browse files
author
Al Viro
committed
media: annotate ->poll() instances
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
1 parent 076ccb7 commit c23e0cb

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

80 files changed

+143
-147
lines changed

drivers/media/cec/cec-api.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,13 +43,13 @@ static inline struct cec_devnode *cec_devnode_data(struct file *filp)
4343

4444
/* CEC file operations */
4545

46-
static unsigned int cec_poll(struct file *filp,
46+
static __poll_t cec_poll(struct file *filp,
4747
struct poll_table_struct *poll)
4848
{
4949
struct cec_devnode *devnode = cec_devnode_data(filp);
5050
struct cec_fh *fh = filp->private_data;
5151
struct cec_adapter *adap = fh->adap;
52-
unsigned int res = 0;
52+
__poll_t res = 0;
5353

5454
if (!devnode->registered)
5555
return POLLERR | POLLHUP;

drivers/media/common/saa7146/saa7146_fops.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -320,13 +320,13 @@ static int fops_mmap(struct file *file, struct vm_area_struct * vma)
320320
return res;
321321
}
322322

323-
static unsigned int __fops_poll(struct file *file, struct poll_table_struct *wait)
323+
static __poll_t __fops_poll(struct file *file, struct poll_table_struct *wait)
324324
{
325325
struct video_device *vdev = video_devdata(file);
326326
struct saa7146_fh *fh = file->private_data;
327327
struct videobuf_buffer *buf = NULL;
328328
struct videobuf_queue *q;
329-
unsigned int res = v4l2_ctrl_poll(file, wait);
329+
__poll_t res = v4l2_ctrl_poll(file, wait);
330330

331331
DEB_EE("file:%p, poll:%p\n", file, wait);
332332

@@ -359,10 +359,10 @@ static unsigned int __fops_poll(struct file *file, struct poll_table_struct *wai
359359
return res;
360360
}
361361

362-
static unsigned int fops_poll(struct file *file, struct poll_table_struct *wait)
362+
static __poll_t fops_poll(struct file *file, struct poll_table_struct *wait)
363363
{
364364
struct video_device *vdev = video_devdata(file);
365-
unsigned int res;
365+
__poll_t res;
366366

367367
mutex_lock(vdev->lock);
368368
res = __fops_poll(file, wait);

drivers/media/common/siano/smsdvb-debugfs.c

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -374,7 +374,7 @@ static int smsdvb_stats_wait_read(struct smsdvb_debugfs *debug_data)
374374
return rc;
375375
}
376376

377-
static unsigned int smsdvb_stats_poll(struct file *file, poll_table *wait)
377+
static __poll_t smsdvb_stats_poll(struct file *file, poll_table *wait)
378378
{
379379
struct smsdvb_debugfs *debug_data = file->private_data;
380380
int rc;
@@ -384,12 +384,9 @@ static unsigned int smsdvb_stats_poll(struct file *file, poll_table *wait)
384384
poll_wait(file, &debug_data->stats_queue, wait);
385385

386386
rc = smsdvb_stats_wait_read(debug_data);
387-
if (rc > 0)
388-
rc = POLLIN | POLLRDNORM;
389-
390387
kref_put(&debug_data->refcount, smsdvb_debugfs_data_release);
391388

392-
return rc;
389+
return rc > 0 ? POLLIN | POLLRDNORM : 0;
393390
}
394391

395392
static ssize_t smsdvb_stats_read(struct file *file, char __user *user_buf,

drivers/media/dvb-core/dmxdev.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1066,10 +1066,10 @@ static long dvb_demux_ioctl(struct file *file, unsigned int cmd,
10661066
return dvb_usercopy(file, cmd, arg, dvb_demux_do_ioctl);
10671067
}
10681068

1069-
static unsigned int dvb_demux_poll(struct file *file, poll_table *wait)
1069+
static __poll_t dvb_demux_poll(struct file *file, poll_table *wait)
10701070
{
10711071
struct dmxdev_filter *dmxdevfilter = file->private_data;
1072-
unsigned int mask = 0;
1072+
__poll_t mask = 0;
10731073

10741074
if ((!dmxdevfilter) || dmxdevfilter->dev->exit)
10751075
return POLLERR;
@@ -1160,11 +1160,11 @@ static long dvb_dvr_ioctl(struct file *file,
11601160
return dvb_usercopy(file, cmd, arg, dvb_dvr_do_ioctl);
11611161
}
11621162

1163-
static unsigned int dvb_dvr_poll(struct file *file, poll_table *wait)
1163+
static __poll_t dvb_dvr_poll(struct file *file, poll_table *wait)
11641164
{
11651165
struct dvb_device *dvbdev = file->private_data;
11661166
struct dmxdev *dmxdev = dvbdev->priv;
1167-
unsigned int mask = 0;
1167+
__poll_t mask = 0;
11681168

11691169
dprintk("%s\n", __func__);
11701170

drivers/media/dvb-core/dvb_ca_en50221.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1783,11 +1783,11 @@ static int dvb_ca_en50221_io_release(struct inode *inode, struct file *file)
17831783
*
17841784
* @return Standard poll mask.
17851785
*/
1786-
static unsigned int dvb_ca_en50221_io_poll(struct file *file, poll_table *wait)
1786+
static __poll_t dvb_ca_en50221_io_poll(struct file *file, poll_table *wait)
17871787
{
17881788
struct dvb_device *dvbdev = file->private_data;
17891789
struct dvb_ca_private *ca = dvbdev->priv;
1790-
unsigned int mask = 0;
1790+
__poll_t mask = 0;
17911791
int slot;
17921792
int result = 0;
17931793

drivers/media/dvb-core/dvb_frontend.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2467,7 +2467,7 @@ static int dvb_frontend_handle_ioctl(struct file *file,
24672467
}
24682468

24692469

2470-
static unsigned int dvb_frontend_poll(struct file *file, struct poll_table_struct *wait)
2470+
static __poll_t dvb_frontend_poll(struct file *file, struct poll_table_struct *wait)
24712471
{
24722472
struct dvb_device *dvbdev = file->private_data;
24732473
struct dvb_frontend *fe = dvbdev->priv;

drivers/media/firewire/firedtv-ci.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -207,7 +207,7 @@ static int fdtv_ca_ioctl(struct file *file, unsigned int cmd, void *arg)
207207
return err;
208208
}
209209

210-
static unsigned int fdtv_ca_io_poll(struct file *file, poll_table *wait)
210+
static __poll_t fdtv_ca_io_poll(struct file *file, poll_table *wait)
211211
{
212212
return POLLIN;
213213
}

drivers/media/media-devnode.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ static ssize_t media_write(struct file *filp, const char __user *buf,
9999
return devnode->fops->write(filp, buf, sz, off);
100100
}
101101

102-
static unsigned int media_poll(struct file *filp,
102+
static __poll_t media_poll(struct file *filp,
103103
struct poll_table_struct *poll)
104104
{
105105
struct media_devnode *devnode = media_devnode_data(filp);

drivers/media/pci/bt8xx/bttv-driver.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2955,12 +2955,12 @@ static ssize_t bttv_read(struct file *file, char __user *data,
29552955
return retval;
29562956
}
29572957

2958-
static unsigned int bttv_poll(struct file *file, poll_table *wait)
2958+
static __poll_t bttv_poll(struct file *file, poll_table *wait)
29592959
{
29602960
struct bttv_fh *fh = file->private_data;
29612961
struct bttv_buffer *buf;
29622962
enum v4l2_field field;
2963-
unsigned int rc = 0;
2963+
__poll_t rc = 0;
29642964
__poll_t req_events = poll_requested_events(wait);
29652965

29662966
if (v4l2_event_pending(&fh->fh))
@@ -3329,13 +3329,13 @@ static ssize_t radio_read(struct file *file, char __user *data,
33293329
return cmd.result;
33303330
}
33313331

3332-
static unsigned int radio_poll(struct file *file, poll_table *wait)
3332+
static __poll_t radio_poll(struct file *file, poll_table *wait)
33333333
{
33343334
struct bttv_fh *fh = file->private_data;
33353335
struct bttv *btv = fh->btv;
33363336
__poll_t req_events = poll_requested_events(wait);
33373337
struct saa6588_command cmd;
3338-
unsigned int res = 0;
3338+
__poll_t res = 0;
33393339

33403340
if (v4l2_event_pending(&fh->fh))
33413341
res = POLLPRI;

drivers/media/pci/cx18/cx18-fileops.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -602,14 +602,14 @@ ssize_t cx18_v4l2_read(struct file *filp, char __user *buf, size_t count,
602602
return cx18_read_pos(s, buf, count, pos, filp->f_flags & O_NONBLOCK);
603603
}
604604

605-
unsigned int cx18_v4l2_enc_poll(struct file *filp, poll_table *wait)
605+
__poll_t cx18_v4l2_enc_poll(struct file *filp, poll_table *wait)
606606
{
607607
__poll_t req_events = poll_requested_events(wait);
608608
struct cx18_open_id *id = file2id(filp);
609609
struct cx18 *cx = id->cx;
610610
struct cx18_stream *s = &cx->streams[id->type];
611611
int eof = test_bit(CX18_F_S_STREAMOFF, &s->s_flags);
612-
unsigned res = 0;
612+
__poll_t res = 0;
613613

614614
/* Start a capture if there is none */
615615
if (!eof && !test_bit(CX18_F_S_STREAMING, &s->s_flags) &&
@@ -629,7 +629,7 @@ unsigned int cx18_v4l2_enc_poll(struct file *filp, poll_table *wait)
629629

630630
if ((s->vb_type == V4L2_BUF_TYPE_VIDEO_CAPTURE) &&
631631
(id->type == CX18_ENC_STREAM_TYPE_YUV)) {
632-
int videobuf_poll = videobuf_poll_stream(filp, &s->vbuf_q, wait);
632+
__poll_t videobuf_poll = videobuf_poll_stream(filp, &s->vbuf_q, wait);
633633

634634
if (v4l2_event_pending(&id->fh))
635635
res |= POLLPRI;

drivers/media/pci/cx18/cx18-fileops.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ ssize_t cx18_v4l2_read(struct file *filp, char __user *buf, size_t count,
2323
ssize_t cx18_v4l2_write(struct file *filp, const char __user *buf, size_t count,
2424
loff_t *pos);
2525
int cx18_v4l2_close(struct file *filp);
26-
unsigned int cx18_v4l2_enc_poll(struct file *filp, poll_table *wait);
26+
__poll_t cx18_v4l2_enc_poll(struct file *filp, poll_table *wait);
2727
int cx18_start_capture(struct cx18_open_id *id);
2828
void cx18_stop_capture(struct cx18_open_id *id, int gop_end);
2929
void cx18_mute(struct cx18 *cx);

drivers/media/pci/ddbridge/ddbridge-core.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -732,13 +732,13 @@ static ssize_t ts_read(struct file *file, __user char *buf,
732732
return (count && (left == count)) ? -EAGAIN : (count - left);
733733
}
734734

735-
static unsigned int ts_poll(struct file *file, poll_table *wait)
735+
static __poll_t ts_poll(struct file *file, poll_table *wait)
736736
{
737737
struct dvb_device *dvbdev = file->private_data;
738738
struct ddb_output *output = dvbdev->priv;
739739
struct ddb_input *input = output->port->input[0];
740740

741-
unsigned int mask = 0;
741+
__poll_t mask = 0;
742742

743743
poll_wait(file, &input->dma->wq, wait);
744744
poll_wait(file, &output->dma->wq, wait);

drivers/media/pci/ivtv/ivtv-fileops.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -730,12 +730,12 @@ ssize_t ivtv_v4l2_write(struct file *filp, const char __user *user_buf, size_t c
730730
return res;
731731
}
732732

733-
unsigned int ivtv_v4l2_dec_poll(struct file *filp, poll_table *wait)
733+
__poll_t ivtv_v4l2_dec_poll(struct file *filp, poll_table *wait)
734734
{
735735
struct ivtv_open_id *id = fh2id(filp->private_data);
736736
struct ivtv *itv = id->itv;
737737
struct ivtv_stream *s = &itv->streams[id->type];
738-
int res = 0;
738+
__poll_t res = 0;
739739

740740
/* add stream's waitq to the poll list */
741741
IVTV_DEBUG_HI_FILE("Decoder poll\n");
@@ -764,14 +764,14 @@ unsigned int ivtv_v4l2_dec_poll(struct file *filp, poll_table *wait)
764764
return res;
765765
}
766766

767-
unsigned int ivtv_v4l2_enc_poll(struct file *filp, poll_table *wait)
767+
__poll_t ivtv_v4l2_enc_poll(struct file *filp, poll_table *wait)
768768
{
769769
__poll_t req_events = poll_requested_events(wait);
770770
struct ivtv_open_id *id = fh2id(filp->private_data);
771771
struct ivtv *itv = id->itv;
772772
struct ivtv_stream *s = &itv->streams[id->type];
773773
int eof = test_bit(IVTV_F_S_STREAMOFF, &s->s_flags);
774-
unsigned res = 0;
774+
__poll_t res = 0;
775775

776776
/* Start a capture if there is none */
777777
if (!eof && !test_bit(IVTV_F_S_STREAMING, &s->s_flags) &&

drivers/media/pci/ivtv/ivtv-fileops.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,8 @@ ssize_t ivtv_v4l2_read(struct file *filp, char __user *buf, size_t count,
2828
ssize_t ivtv_v4l2_write(struct file *filp, const char __user *buf, size_t count,
2929
loff_t * pos);
3030
int ivtv_v4l2_close(struct file *filp);
31-
unsigned int ivtv_v4l2_enc_poll(struct file *filp, poll_table * wait);
32-
unsigned int ivtv_v4l2_dec_poll(struct file *filp, poll_table * wait);
31+
__poll_t ivtv_v4l2_enc_poll(struct file *filp, poll_table * wait);
32+
__poll_t ivtv_v4l2_dec_poll(struct file *filp, poll_table * wait);
3333
int ivtv_start_capture(struct ivtv_open_id *id);
3434
void ivtv_stop_capture(struct ivtv_open_id *id, int gop_end);
3535
int ivtv_start_decoding(struct ivtv_open_id *id, int speed);

drivers/media/pci/meye/meye.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1423,9 +1423,9 @@ static long vidioc_default(struct file *file, void *fh, bool valid_prio,
14231423

14241424
}
14251425

1426-
static unsigned int meye_poll(struct file *file, poll_table *wait)
1426+
static __poll_t meye_poll(struct file *file, poll_table *wait)
14271427
{
1428-
unsigned int res = v4l2_ctrl_poll(file, wait);
1428+
__poll_t res = v4l2_ctrl_poll(file, wait);
14291429

14301430
mutex_lock(&meye.lock);
14311431
poll_wait(file, &meye.proc_list, wait);

drivers/media/pci/saa7134/saa7134-video.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1227,11 +1227,11 @@ static ssize_t radio_read(struct file *file, char __user *data,
12271227
return cmd.result;
12281228
}
12291229

1230-
static unsigned int radio_poll(struct file *file, poll_table *wait)
1230+
static __poll_t radio_poll(struct file *file, poll_table *wait)
12311231
{
12321232
struct saa7134_dev *dev = video_drvdata(file);
12331233
struct saa6588_command cmd;
1234-
unsigned int rc = v4l2_ctrl_poll(file, wait);
1234+
__poll_t rc = v4l2_ctrl_poll(file, wait);
12351235

12361236
cmd.instance = file;
12371237
cmd.event_list = wait;

drivers/media/pci/saa7164/saa7164-encoder.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -909,13 +909,13 @@ static ssize_t fops_read(struct file *file, char __user *buffer,
909909
return ret;
910910
}
911911

912-
static unsigned int fops_poll(struct file *file, poll_table *wait)
912+
static __poll_t fops_poll(struct file *file, poll_table *wait)
913913
{
914914
__poll_t req_events = poll_requested_events(wait);
915915
struct saa7164_encoder_fh *fh =
916916
(struct saa7164_encoder_fh *)file->private_data;
917917
struct saa7164_port *port = fh->port;
918-
unsigned int mask = v4l2_ctrl_poll(file, wait);
918+
__poll_t mask = v4l2_ctrl_poll(file, wait);
919919

920920
port->last_poll_msecs_diff = port->last_poll_msecs;
921921
port->last_poll_msecs = jiffies_to_msecs(jiffies);

drivers/media/pci/saa7164/saa7164-vbi.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -614,11 +614,11 @@ static ssize_t fops_read(struct file *file, char __user *buffer,
614614
return ret;
615615
}
616616

617-
static unsigned int fops_poll(struct file *file, poll_table *wait)
617+
static __poll_t fops_poll(struct file *file, poll_table *wait)
618618
{
619619
struct saa7164_vbi_fh *fh = (struct saa7164_vbi_fh *)file->private_data;
620620
struct saa7164_port *port = fh->port;
621-
unsigned int mask = 0;
621+
__poll_t mask = 0;
622622

623623
port->last_poll_msecs_diff = port->last_poll_msecs;
624624
port->last_poll_msecs = jiffies_to_msecs(jiffies);

drivers/media/pci/ttpci/av7110_av.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -937,11 +937,11 @@ static int dvb_video_get_event (struct av7110 *av7110, struct video_event *event
937937
* DVB device file operations
938938
******************************************************************************/
939939

940-
static unsigned int dvb_video_poll(struct file *file, poll_table *wait)
940+
static __poll_t dvb_video_poll(struct file *file, poll_table *wait)
941941
{
942942
struct dvb_device *dvbdev = file->private_data;
943943
struct av7110 *av7110 = dvbdev->priv;
944-
unsigned int mask = 0;
944+
__poll_t mask = 0;
945945

946946
dprintk(2, "av7110:%p, \n", av7110);
947947

@@ -989,11 +989,11 @@ static ssize_t dvb_video_write(struct file *file, const char __user *buf,
989989
return dvb_play(av7110, buf, count, file->f_flags & O_NONBLOCK, 1);
990990
}
991991

992-
static unsigned int dvb_audio_poll(struct file *file, poll_table *wait)
992+
static __poll_t dvb_audio_poll(struct file *file, poll_table *wait)
993993
{
994994
struct dvb_device *dvbdev = file->private_data;
995995
struct av7110 *av7110 = dvbdev->priv;
996-
unsigned int mask = 0;
996+
__poll_t mask = 0;
997997

998998
dprintk(2, "av7110:%p, \n", av7110);
999999

drivers/media/pci/ttpci/av7110_ca.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -223,13 +223,13 @@ static int dvb_ca_open(struct inode *inode, struct file *file)
223223
return 0;
224224
}
225225

226-
static unsigned int dvb_ca_poll (struct file *file, poll_table *wait)
226+
static __poll_t dvb_ca_poll (struct file *file, poll_table *wait)
227227
{
228228
struct dvb_device *dvbdev = file->private_data;
229229
struct av7110 *av7110 = dvbdev->priv;
230230
struct dvb_ringbuffer *rbuf = &av7110->ci_rbuffer;
231231
struct dvb_ringbuffer *wbuf = &av7110->ci_wbuffer;
232-
unsigned int mask = 0;
232+
__poll_t mask = 0;
233233

234234
dprintk(8, "av7110:%p\n",av7110);
235235

drivers/media/pci/zoran/zoran_driver.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2501,13 +2501,13 @@ static int zoran_s_jpegcomp(struct file *file, void *__fh,
25012501
return res;
25022502
}
25032503

2504-
static unsigned int
2504+
static __poll_t
25052505
zoran_poll (struct file *file,
25062506
poll_table *wait)
25072507
{
25082508
struct zoran_fh *fh = file->private_data;
25092509
struct zoran *zr = fh->zr;
2510-
int res = v4l2_ctrl_poll(file, wait);
2510+
__poll_t res = v4l2_ctrl_poll(file, wait);
25112511
int frame;
25122512
unsigned long flags;
25132513

drivers/media/platform/davinci/vpfe_capture.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -730,7 +730,7 @@ static int vpfe_mmap(struct file *file, struct vm_area_struct *vma)
730730
/*
731731
* vpfe_poll: It is used for select/poll system call
732732
*/
733-
static unsigned int vpfe_poll(struct file *file, poll_table *wait)
733+
static __poll_t vpfe_poll(struct file *file, poll_table *wait)
734734
{
735735
struct vpfe_device *vpfe_dev = video_drvdata(file);
736736

0 commit comments

Comments
 (0)