diff options
author | darron@kewl.org <darron@kewl.org> | 2008-10-16 00:26:34 +0100 |
---|---|---|
committer | darron@kewl.org <darron@kewl.org> | 2008-10-16 00:26:34 +0100 |
commit | a02327e81915e000e69a6db7297d68d578b8df97 (patch) | |
tree | 30f1a6427ff4bc7e304d86c5043d9c6293c1f5e7 /linux | |
parent | 88ad9b4d994c8b8e301d0097ae3d6e27bf717683 (diff) | |
download | mediapointer-dvb-s2-a02327e81915e000e69a6db7297d68d578b8df97.tar.gz mediapointer-dvb-s2-a02327e81915e000e69a6db7297d68d578b8df97.tar.bz2 |
videobuf: data storage optimisation (2)
From: Darron Broad <darron@kewl.org>
To optimise data storage even further one other redundant
var has been removed.
This also removes a redundant assignment.
Priority: normal
Signed-off-by: Darron Broad <darron@kewl.org>
iSigned-off-by: Steven Toth <stoth@linuxtv.org>
Diffstat (limited to 'linux')
-rw-r--r-- | linux/drivers/media/video/cx23885/cx23885-dvb.c | 2 | ||||
-rw-r--r-- | linux/drivers/media/video/cx88/cx88-mpeg.c | 2 | ||||
-rw-r--r-- | linux/drivers/media/video/saa7134/saa7134-dvb.c | 2 | ||||
-rw-r--r-- | linux/drivers/media/video/videobuf-dvb.c | 7 | ||||
-rw-r--r-- | linux/include/media/videobuf-dvb.h | 3 |
5 files changed, 6 insertions, 10 deletions
diff --git a/linux/drivers/media/video/cx23885/cx23885-dvb.c b/linux/drivers/media/video/cx23885/cx23885-dvb.c index 43baf5aea..a11fdbfb5 100644 --- a/linux/drivers/media/video/cx23885/cx23885-dvb.c +++ b/linux/drivers/media/video/cx23885/cx23885-dvb.c @@ -572,7 +572,7 @@ int cx23885_dvb_register(struct cx23885_tsport *port) port->num_frontends); for (i = 1; i <= port->num_frontends; i++) { - if (videobuf_dvb_alloc_frontend(dev, + if (videobuf_dvb_alloc_frontend( &port->frontends, i) == NULL) { printk(KERN_ERR "%s() failed to alloc\n", __func__); return -ENOMEM; diff --git a/linux/drivers/media/video/cx88/cx88-mpeg.c b/linux/drivers/media/video/cx88/cx88-mpeg.c index 8df19ae43..bad3680b9 100644 --- a/linux/drivers/media/video/cx88/cx88-mpeg.c +++ b/linux/drivers/media/video/cx88/cx88-mpeg.c @@ -847,7 +847,7 @@ static int __devinit cx8802_probe(struct pci_dev *pci_dev, printk(KERN_INFO "%s() allocating %d frontend(s)\n", __func__, core->board.num_frontends); for (i = 1; i <= core->board.num_frontends; i++) { - demod = videobuf_dvb_alloc_frontend(dev, &dev->frontends, i); + demod = videobuf_dvb_alloc_frontend(&dev->frontends, i); if(demod == NULL) { printk(KERN_ERR "%s() failed to alloc\n", __func__); err = -ENOMEM; diff --git a/linux/drivers/media/video/saa7134/saa7134-dvb.c b/linux/drivers/media/video/saa7134/saa7134-dvb.c index 63f76afac..099761046 100644 --- a/linux/drivers/media/video/saa7134/saa7134-dvb.c +++ b/linux/drivers/media/video/saa7134/saa7134-dvb.c @@ -958,7 +958,7 @@ static int dvb_init(struct saa7134_dev *dev) printk(KERN_INFO "%s() allocating 1 frontend\n", __func__); - if (videobuf_dvb_alloc_frontend(dev, &dev->frontends, 1) == NULL) { + if (videobuf_dvb_alloc_frontend(&dev->frontends, 1) == NULL) { printk(KERN_ERR "%s() failed to alloc\n", __func__); return -ENOMEM; } diff --git a/linux/drivers/media/video/videobuf-dvb.c b/linux/drivers/media/video/videobuf-dvb.c index 12dcd486a..67cee5ea9 100644 --- a/linux/drivers/media/video/videobuf-dvb.c +++ b/linux/drivers/media/video/videobuf-dvb.c @@ -312,10 +312,8 @@ void videobuf_dvb_unregister_bus(struct videobuf_dvb_frontends *f) dvb_dmx_release(&fe->dvb.demux); dvb_unregister_frontend(fe->dvb.frontend); } - if(fe->dvb.frontend) { /* always allocated, may have been reset */ + if(fe->dvb.frontend) /* always allocated, may have been reset */ dvb_frontend_detach(fe->dvb.frontend); - fe->dvb.frontend = NULL; - } list_del(list); kfree(fe); } @@ -365,7 +363,7 @@ int videobuf_dvb_find_frontend(struct videobuf_dvb_frontends *f, struct dvb_fron return ret; } -struct videobuf_dvb_frontend * videobuf_dvb_alloc_frontend(void *private, struct videobuf_dvb_frontends *f, int id) +struct videobuf_dvb_frontend * videobuf_dvb_alloc_frontend(struct videobuf_dvb_frontends *f, int id) { struct videobuf_dvb_frontend *fe; @@ -373,7 +371,6 @@ struct videobuf_dvb_frontend * videobuf_dvb_alloc_frontend(void *private, struct if (fe == NULL) goto fail_alloc; - fe->dev = private; fe->id = id; mutex_init(&fe->dvb.lock); diff --git a/linux/include/media/videobuf-dvb.h b/linux/include/media/videobuf-dvb.h index 069215c77..52ddda90d 100644 --- a/linux/include/media/videobuf-dvb.h +++ b/linux/include/media/videobuf-dvb.h @@ -25,7 +25,6 @@ struct videobuf_dvb { struct videobuf_dvb_frontend { struct list_head felist; - void *dev; int id; struct videobuf_dvb dvb; }; @@ -57,7 +56,7 @@ int videobuf_dvb_register_adapter(struct videobuf_dvb_frontends *f, int videobuf_dvb_register_frontend(struct dvb_adapter *adapter, struct videobuf_dvb *dvb); -struct videobuf_dvb_frontend * videobuf_dvb_alloc_frontend(void *private, struct videobuf_dvb_frontends *f, int id); +struct videobuf_dvb_frontend * videobuf_dvb_alloc_frontend(struct videobuf_dvb_frontends *f, int id); struct videobuf_dvb_frontend * videobuf_dvb_get_frontend(struct videobuf_dvb_frontends *f, int id); int videobuf_dvb_find_frontend(struct videobuf_dvb_frontends *f, struct dvb_frontend *p); |