summaryrefslogtreecommitdiff
path: root/linux/drivers/media
diff options
context:
space:
mode:
authorHolger Waechtler <devnull@localhost>2003-02-20 15:00:37 +0000
committerHolger Waechtler <devnull@localhost>2003-02-20 15:00:37 +0000
commitb01856d0825ac217cbf60d11052f0339fda9e78d (patch)
tree5923d8eeb79de4aa77ea7d303feb1969011517ab /linux/drivers/media
parent7909ab1a27f58b54b6238d9fd78d005bf27dff48 (diff)
downloadmediapointer-dvb-s2-b01856d0825ac217cbf60d11052f0339fda9e78d.tar.gz
mediapointer-dvb-s2-b01856d0825ac217cbf60d11052f0339fda9e78d.tar.bz2
ensure that poll_wait() is always called in poll()
Diffstat (limited to 'linux/drivers/media')
-rw-r--r--linux/drivers/media/dvb/dvb-core/dmxdev.c3
-rw-r--r--linux/drivers/media/dvb/ttpci/av7110.c12
2 files changed, 6 insertions, 9 deletions
diff --git a/linux/drivers/media/dvb/dvb-core/dmxdev.c b/linux/drivers/media/dvb/dvb-core/dmxdev.c
index af4d267d8..bb1ed50d1 100644
--- a/linux/drivers/media/dvb/dvb-core/dmxdev.c
+++ b/linux/drivers/media/dvb/dvb-core/dmxdev.c
@@ -983,9 +983,6 @@ unsigned int dvb_demux_poll (struct file *file, poll_table *wait)
if (!dmxdevfilter)
return -EINVAL;
- if (dmxdevfilter->buffer.pread != dmxdevfilter->buffer.pwrite)
- return (POLLIN | POLLRDNORM | POLLPRI);
-
poll_wait(file, &dmxdevfilter->buffer.queue, wait);
if (dmxdevfilter->state != DMXDEV_STATE_GO)
diff --git a/linux/drivers/media/dvb/ttpci/av7110.c b/linux/drivers/media/dvb/ttpci/av7110.c
index 7fe27458f..7838c9ab4 100644
--- a/linux/drivers/media/dvb/ttpci/av7110.c
+++ b/linux/drivers/media/dvb/ttpci/av7110.c
@@ -2643,9 +2643,9 @@ unsigned int dvb_audio_poll(struct file *file, poll_table *wait)
DEB_EE(("av7110: %p\n",av7110));
- if (av7110->playing) {
- poll_wait(file, &av7110->aout.queue, wait);
+ poll_wait(file, &av7110->aout.queue, wait);
+ if (av7110->playing) {
if (dvb_ringbuffer_free(&av7110->aout)>20*1024)
mask |= (POLLOUT | POLLWRNORM);
} else /* if not playing: may play if asked for */
@@ -3153,10 +3153,9 @@ unsigned int dvb_ca_poll (struct file *file, poll_table *wait)
{
struct dvb_device *dvbdev = (struct dvb_device *) file->private_data;
av7110_t *av7110 = (av7110_t *) dvbdev->priv;
- unsigned int mask = 0;
-
dvb_ringbuffer_t *rbuf = &av7110->ci_rbuffer;
dvb_ringbuffer_t *wbuf = &av7110->ci_wbuffer;
+ unsigned int mask = 0;
DEB_EE(("av7110: %p\n",av7110));
@@ -3296,8 +3295,9 @@ unsigned int dvb_video_poll(struct file *file, poll_table *wait)
DEB_EE(("av7110: %p\n",av7110));
- if (av7110->playing) {
- poll_wait(file, &av7110->avout.queue, wait);
+ poll_wait(file, &av7110->avout.queue, wait);
+
+ if (av7110->playing) {
if (FREE_COND)
mask |= (POLLOUT | POLLWRNORM);
} else /* if not playing: may play if asked for */