summaryrefslogtreecommitdiff
path: root/linux/drivers/media/dvb
diff options
context:
space:
mode:
authorAndreas Oberritter <devnull@localhost>2003-01-02 05:56:45 +0000
committerAndreas Oberritter <devnull@localhost>2003-01-02 05:56:45 +0000
commit3512f958136a0cd987249c10d36099bd1b1ef3e7 (patch)
tree214bec97b6eb2f36fd8592eeb7461b8d031a5607 /linux/drivers/media/dvb
parent0f1e6fec73f895c45c0bfb176dc6d81d4eab9dea (diff)
downloadmediapointer-dvb-s2-3512f958136a0cd987249c10d36099bd1b1ef3e7.tar.gz
mediapointer-dvb-s2-3512f958136a0cd987249c10d36099bd1b1ef3e7.tar.bz2
allow multiple read only users
Diffstat (limited to 'linux/drivers/media/dvb')
-rw-r--r--linux/drivers/media/dvb/dvb-core/dvb_frontend.c13
1 files changed, 8 insertions, 5 deletions
diff --git a/linux/drivers/media/dvb/dvb-core/dvb_frontend.c b/linux/drivers/media/dvb/dvb-core/dvb_frontend.c
index c17d72033..635d6ad94 100644
--- a/linux/drivers/media/dvb/dvb-core/dvb_frontend.c
+++ b/linux/drivers/media/dvb/dvb-core/dvb_frontend.c
@@ -614,10 +614,12 @@ int dvb_frontend_open (struct inode *inode, struct file *file)
if ((ret = dvb_generic_open (inode, file)) < 0)
return ret;
- dvb_frontend_start (fe);
+ if ((file->f_flags & O_ACCMODE) != O_RDONLY) {
+ dvb_frontend_start (fe);
- /* empty event queue */
- fe->events.eventr = fe->events.eventw;
+ /* empty event queue */
+ fe->events.eventr = fe->events.eventw;
+ }
return ret;
}
@@ -631,7 +633,8 @@ int dvb_frontend_release (struct inode *inode, struct file *file)
dprintk ("%s\n", __FUNCTION__);
- fe->release_jiffies = jiffies;
+ if ((file->f_flags & O_ACCMODE) != O_RDONLY)
+ fe->release_jiffies = jiffies;
return dvb_generic_release (inode, file);
}
@@ -849,7 +852,7 @@ dvb_register_frontend (int (*ioctl) (struct dvb_frontend *frontend,
struct list_head *entry;
struct dvb_frontend_data *fe;
static const struct dvb_device dvbdev_template = {
- .users = 1,
+ .users = ~0,
.writers = 1,
.fops = &dvb_frontend_fops,
.kernel_ioctl = dvb_frontend_ioctl