mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-06-29 18:11:20 +00:00
V4L/DVB (9271): videobuf: data storage optimisation (2)
To optimise data storage even further one other redundant var has been removed. This also removes a redundant assignment. Signed-off-by: Steven Toth <stoth@linuxtv.org> Signed-off-by: Darron Broad <darron@kewl.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
This commit is contained in:
parent
745632147d
commit
96b7a1a838
5 changed files with 6 additions and 10 deletions
|
@ -571,7 +571,7 @@ int cx23885_dvb_register(struct cx23885_tsport *port)
|
||||||
port->num_frontends);
|
port->num_frontends);
|
||||||
|
|
||||||
for (i = 1; i <= port->num_frontends; i++) {
|
for (i = 1; i <= port->num_frontends; i++) {
|
||||||
if (videobuf_dvb_alloc_frontend(dev,
|
if (videobuf_dvb_alloc_frontend(
|
||||||
&port->frontends, i) == NULL) {
|
&port->frontends, i) == NULL) {
|
||||||
printk(KERN_ERR "%s() failed to alloc\n", __func__);
|
printk(KERN_ERR "%s() failed to alloc\n", __func__);
|
||||||
return -ENOMEM;
|
return -ENOMEM;
|
||||||
|
|
|
@ -807,7 +807,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);
|
printk(KERN_INFO "%s() allocating %d frontend(s)\n", __func__, core->board.num_frontends);
|
||||||
|
|
||||||
for (i = 1; i <= core->board.num_frontends; i++) {
|
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) {
|
if(demod == NULL) {
|
||||||
printk(KERN_ERR "%s() failed to alloc\n", __func__);
|
printk(KERN_ERR "%s() failed to alloc\n", __func__);
|
||||||
err = -ENOMEM;
|
err = -ENOMEM;
|
||||||
|
|
|
@ -958,7 +958,7 @@ static int dvb_init(struct saa7134_dev *dev)
|
||||||
|
|
||||||
printk(KERN_INFO "%s() allocating 1 frontend\n", __func__);
|
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__);
|
printk(KERN_ERR "%s() failed to alloc\n", __func__);
|
||||||
return -ENOMEM;
|
return -ENOMEM;
|
||||||
}
|
}
|
||||||
|
|
|
@ -307,10 +307,8 @@ void videobuf_dvb_unregister_bus(struct videobuf_dvb_frontends *f)
|
||||||
dvb_dmx_release(&fe->dvb.demux);
|
dvb_dmx_release(&fe->dvb.demux);
|
||||||
dvb_unregister_frontend(fe->dvb.frontend);
|
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);
|
dvb_frontend_detach(fe->dvb.frontend);
|
||||||
fe->dvb.frontend = NULL;
|
|
||||||
}
|
|
||||||
list_del(list);
|
list_del(list);
|
||||||
kfree(fe);
|
kfree(fe);
|
||||||
}
|
}
|
||||||
|
@ -360,7 +358,7 @@ int videobuf_dvb_find_frontend(struct videobuf_dvb_frontends *f, struct dvb_fron
|
||||||
return ret;
|
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;
|
struct videobuf_dvb_frontend *fe;
|
||||||
|
|
||||||
|
@ -368,7 +366,6 @@ struct videobuf_dvb_frontend * videobuf_dvb_alloc_frontend(void *private, struct
|
||||||
if (fe == NULL)
|
if (fe == NULL)
|
||||||
goto fail_alloc;
|
goto fail_alloc;
|
||||||
|
|
||||||
fe->dev = private;
|
|
||||||
fe->id = id;
|
fe->id = id;
|
||||||
mutex_init(&fe->dvb.lock);
|
mutex_init(&fe->dvb.lock);
|
||||||
|
|
||||||
|
|
|
@ -25,7 +25,6 @@ struct videobuf_dvb {
|
||||||
|
|
||||||
struct videobuf_dvb_frontend {
|
struct videobuf_dvb_frontend {
|
||||||
struct list_head felist;
|
struct list_head felist;
|
||||||
void *dev;
|
|
||||||
int id;
|
int id;
|
||||||
struct videobuf_dvb dvb;
|
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);
|
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);
|
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);
|
int videobuf_dvb_find_frontend(struct videobuf_dvb_frontends *f, struct dvb_frontend *p);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue