diff options
author | Gerd Knorr <devnull@localhost> | 2004-10-20 17:44:23 +0000 |
---|---|---|
committer | Gerd Knorr <devnull@localhost> | 2004-10-20 17:44:23 +0000 |
commit | b6e0bc4cf1eebed71e6bd7f67bf1e3e7fc8764c6 (patch) | |
tree | 2b92afaa3a49e0128448dd73bbc3099febb15b26 /linux/drivers/media/video/saa7134 | |
parent | 0ccd772fd27e5b6ddb7a5cabe182b5c4128d3dc3 (diff) | |
download | mediapointer-dvb-s2-b6e0bc4cf1eebed71e6bd7f67bf1e3e7fc8764c6.tar.gz mediapointer-dvb-s2-b6e0bc4cf1eebed71e6bd7f67bf1e3e7fc8764c6.tar.bz2 |
- switch over to "frontend refactored" cvs branch.
Diffstat (limited to 'linux/drivers/media/video/saa7134')
-rw-r--r-- | linux/drivers/media/video/saa7134/saa7134-dvb.c | 28 | ||||
-rw-r--r-- | linux/drivers/media/video/saa7134/saa7134-empress.c | 12 | ||||
-rw-r--r-- | linux/drivers/media/video/saa7134/saa7134.h | 3 |
3 files changed, 8 insertions, 35 deletions
diff --git a/linux/drivers/media/video/saa7134/saa7134-dvb.c b/linux/drivers/media/video/saa7134/saa7134-dvb.c index 662a45c10..685297a9f 100644 --- a/linux/drivers/media/video/saa7134/saa7134-dvb.c +++ b/linux/drivers/media/video/saa7134/saa7134-dvb.c @@ -1,5 +1,5 @@ /* - * $Id: saa7134-dvb.c,v 1.1 2004/10/19 16:02:05 kraxel Exp $ + * $Id: saa7134-dvb.c,v 1.2 2004/10/20 17:44:24 kraxel Exp $ * * (c) 2004 Gerd Knorr <kraxel@bytesex.org> [SuSE Labs] * @@ -37,8 +37,6 @@ MODULE_LICENSE("GPL"); static int dvb_init(struct saa7134_dev *dev) { - int err; - printk("%s: %s\n",dev->name,__FUNCTION__); videobuf_queue_init(&dev->dvb.dvbq, &saa7134_ts_qops, @@ -52,36 +50,18 @@ static int dvb_init(struct saa7134_dev *dev) dev->dvb.priv = dev; dev->dvb.name = dev->name; - /* register adapter */ - err = dvb_register_adapter(&dev->dvb.adapter, dev->name, - THIS_MODULE); - if (err < 0) { - printk(KERN_WARNING "%s: dvb_register_adapter failed (errno = %d)\n", - dev->name, err); - goto fail1; - } - /* TODO: init + register frontend */ + if (NULL == dev->dvb.frontend) + return -1; /* register everything else */ - err = videobuf_dvb_register(&dev->dvb); - if (0 != err) - goto fail2; - return 0; - -fail2: - dvb_unregister_adapter(dev->dvb.adapter); -fail1: - return err; + return videobuf_dvb_register(&dev->dvb); } static int dvb_fini(struct saa7134_dev *dev) { printk("%s: %s\n",dev->name,__FUNCTION__); - videobuf_dvb_unregister(&dev->dvb); - /* TODO: unregister frontend */ - dvb_unregister_adapter(dev->dvb.adapter); return 0; } diff --git a/linux/drivers/media/video/saa7134/saa7134-empress.c b/linux/drivers/media/video/saa7134/saa7134-empress.c index e301bec5e..683ef885c 100644 --- a/linux/drivers/media/video/saa7134/saa7134-empress.c +++ b/linux/drivers/media/video/saa7134/saa7134-empress.c @@ -1,5 +1,5 @@ /* - * $Id: saa7134-empress.c,v 1.1 2004/10/19 16:02:05 kraxel Exp $ + * $Id: saa7134-empress.c,v 1.2 2004/10/20 17:44:24 kraxel Exp $ * * (c) 2004 Gerd Knorr <kraxel@bytesex.org> [SuSE Labs] * @@ -90,9 +90,9 @@ static int ts_open(struct inode *inode, struct file *file) if (dev->empress_users) goto done; - dev->empress_started = 0; dev->empress_users++; file->private_data = dev; + ts_init_encoder(dev, NULL); err = 0; done: @@ -112,8 +112,7 @@ static int ts_release(struct inode *inode, struct file *file) dev->empress_users--; /* stop the encoder */ - if (dev->empress_started) - ts_reset_encoder(dev); + ts_reset_encoder(dev); up(&dev->empress_tsq.lock); return 0; @@ -124,11 +123,6 @@ ts_read(struct file *file, char __user *data, size_t count, loff_t *ppos) { struct saa7134_dev *dev = file->private_data; - if (!dev->empress_started) { - ts_init_encoder(dev, NULL); - dev->empress_started = 1; - } - return videobuf_read_stream(file->private_data, &dev->empress_tsq, data, count, ppos, 0, file->f_flags & O_NONBLOCK); diff --git a/linux/drivers/media/video/saa7134/saa7134.h b/linux/drivers/media/video/saa7134/saa7134.h index 45fe49c3d..b55aa1b17 100644 --- a/linux/drivers/media/video/saa7134/saa7134.h +++ b/linux/drivers/media/video/saa7134/saa7134.h @@ -1,5 +1,5 @@ /* - * $Id: saa7134.h,v 1.23 2004/10/19 16:02:05 kraxel Exp $ + * $Id: saa7134.h,v 1.24 2004/10/20 17:44:24 kraxel Exp $ * * v4l2 device driver for philips saa7134 based TV cards * @@ -462,7 +462,6 @@ struct saa7134_dev { /* SAA7134_MPEG_EMPRESS only */ struct video_device *empress_dev; struct videobuf_queue empress_tsq; - int empress_started; unsigned int empress_users; /* SAA7134_MPEG_DVB only */ |