aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/dvb-core/dmxdev.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2018-02-11 17:34:03 -0500
committerLinus Torvalds <torvalds@linux-foundation.org>2018-02-11 17:34:03 -0500
commita9a08845e9acbd224e4ee466f5c1275ed50054e8 (patch)
tree415d6e6a82e001c65e6b161539411f54ba5fe8ce /drivers/media/dvb-core/dmxdev.c
parentee5daa1361fceb6f482c005bcc9ba8d01b92ea5c (diff)
vfs: do bulk POLL* -> EPOLL* replacement
This is the mindless scripted replacement of kernel use of POLL* variables as described by Al, done by this script: for V in IN OUT PRI ERR RDNORM RDBAND WRNORM WRBAND HUP RDHUP NVAL MSG; do L=`git grep -l -w POLL$V | grep -v '^t' | grep -v /um/ | grep -v '^sa' | grep -v '/poll.h$'|grep -v '^D'` for f in $L; do sed -i "-es/^\([^\"]*\)\(\<POLL$V\>\)/\\1E\\2/" $f; done done with de-mangling cleanups yet to come. NOTE! On almost all architectures, the EPOLL* constants have the same values as the POLL* constants do. But they keyword here is "almost". For various bad reasons they aren't the same, and epoll() doesn't actually work quite correctly in some cases due to this on Sparc et al. The next patch from Al will sort out the final differences, and we should be all done. Scripted-by: Al Viro <viro@zeniv.linux.org.uk> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'drivers/media/dvb-core/dmxdev.c')
-rw-r--r--drivers/media/dvb-core/dmxdev.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/drivers/media/dvb-core/dmxdev.c b/drivers/media/dvb-core/dmxdev.c
index bc198f84b9cd..6d53af00190e 100644
--- a/drivers/media/dvb-core/dmxdev.c
+++ b/drivers/media/dvb-core/dmxdev.c
@@ -1179,7 +1179,7 @@ static __poll_t dvb_demux_poll(struct file *file, poll_table *wait)
1179 __poll_t mask = 0; 1179 __poll_t mask = 0;
1180 1180
1181 if ((!dmxdevfilter) || dmxdevfilter->dev->exit) 1181 if ((!dmxdevfilter) || dmxdevfilter->dev->exit)
1182 return POLLERR; 1182 return EPOLLERR;
1183 if (dvb_vb2_is_streaming(&dmxdevfilter->vb2_ctx)) 1183 if (dvb_vb2_is_streaming(&dmxdevfilter->vb2_ctx))
1184 return dvb_vb2_poll(&dmxdevfilter->vb2_ctx, file, wait); 1184 return dvb_vb2_poll(&dmxdevfilter->vb2_ctx, file, wait);
1185 1185
@@ -1191,10 +1191,10 @@ static __poll_t dvb_demux_poll(struct file *file, poll_table *wait)
1191 return 0; 1191 return 0;
1192 1192
1193 if (dmxdevfilter->buffer.error) 1193 if (dmxdevfilter->buffer.error)
1194 mask |= (POLLIN | POLLRDNORM | POLLPRI | POLLERR); 1194 mask |= (EPOLLIN | EPOLLRDNORM | EPOLLPRI | EPOLLERR);
1195 1195
1196 if (!dvb_ringbuffer_empty(&dmxdevfilter->buffer)) 1196 if (!dvb_ringbuffer_empty(&dmxdevfilter->buffer))
1197 mask |= (POLLIN | POLLRDNORM | POLLPRI); 1197 mask |= (EPOLLIN | EPOLLRDNORM | EPOLLPRI);
1198 1198
1199 return mask; 1199 return mask;
1200} 1200}
@@ -1331,7 +1331,7 @@ static __poll_t dvb_dvr_poll(struct file *file, poll_table *wait)
1331 dprintk("%s\n", __func__); 1331 dprintk("%s\n", __func__);
1332 1332
1333 if (dmxdev->exit) 1333 if (dmxdev->exit)
1334 return POLLERR; 1334 return EPOLLERR;
1335 if (dvb_vb2_is_streaming(&dmxdev->dvr_vb2_ctx)) 1335 if (dvb_vb2_is_streaming(&dmxdev->dvr_vb2_ctx))
1336 return dvb_vb2_poll(&dmxdev->dvr_vb2_ctx, file, wait); 1336 return dvb_vb2_poll(&dmxdev->dvr_vb2_ctx, file, wait);
1337 1337
@@ -1343,12 +1343,12 @@ static __poll_t dvb_dvr_poll(struct file *file, poll_table *wait)
1343#endif 1343#endif
1344 if (need_ringbuffer) { 1344 if (need_ringbuffer) {
1345 if (dmxdev->dvr_buffer.error) 1345 if (dmxdev->dvr_buffer.error)
1346 mask |= (POLLIN | POLLRDNORM | POLLPRI | POLLERR); 1346 mask |= (EPOLLIN | EPOLLRDNORM | EPOLLPRI | EPOLLERR);
1347 1347
1348 if (!dvb_ringbuffer_empty(&dmxdev->dvr_buffer)) 1348 if (!dvb_ringbuffer_empty(&dmxdev->dvr_buffer))
1349 mask |= (POLLIN | POLLRDNORM | POLLPRI); 1349 mask |= (EPOLLIN | EPOLLRDNORM | EPOLLPRI);
1350 } else 1350 } else
1351 mask |= (POLLOUT | POLLWRNORM | POLLPRI); 1351 mask |= (EPOLLOUT | EPOLLWRNORM | EPOLLPRI);
1352 1352
1353 return mask; 1353 return mask;
1354} 1354}