diff options
author | Darron Broad <darron@kewl.org> | 2008-10-15 19:26:34 -0400 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2008-10-17 16:29:59 -0400 |
commit | 96b7a1a838fb5b8746fc22f4ff3cef358bf59f35 (patch) | |
tree | 01262ee7ba5500fdd227ef87968cb401c2206b1a /drivers/media | |
parent | 745632147d54cd4db6812045351510ebd3981a24 (diff) |
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>
Diffstat (limited to 'drivers/media')
-rw-r--r-- | drivers/media/video/cx23885/cx23885-dvb.c | 2 | ||||
-rw-r--r-- | drivers/media/video/cx88/cx88-mpeg.c | 2 | ||||
-rw-r--r-- | drivers/media/video/saa7134/saa7134-dvb.c | 2 | ||||
-rw-r--r-- | drivers/media/video/videobuf-dvb.c | 7 |
4 files changed, 5 insertions, 8 deletions
diff --git a/drivers/media/video/cx23885/cx23885-dvb.c b/drivers/media/video/cx23885/cx23885-dvb.c index 8e9871106afa..e1aac07b3158 100644 --- a/drivers/media/video/cx23885/cx23885-dvb.c +++ b/drivers/media/video/cx23885/cx23885-dvb.c | |||
@@ -571,7 +571,7 @@ int cx23885_dvb_register(struct cx23885_tsport *port) | |||
571 | port->num_frontends); | 571 | port->num_frontends); |
572 | 572 | ||
573 | for (i = 1; i <= port->num_frontends; i++) { | 573 | for (i = 1; i <= port->num_frontends; i++) { |
574 | if (videobuf_dvb_alloc_frontend(dev, | 574 | if (videobuf_dvb_alloc_frontend( |
575 | &port->frontends, i) == NULL) { | 575 | &port->frontends, i) == NULL) { |
576 | printk(KERN_ERR "%s() failed to alloc\n", __func__); | 576 | printk(KERN_ERR "%s() failed to alloc\n", __func__); |
577 | return -ENOMEM; | 577 | return -ENOMEM; |
diff --git a/drivers/media/video/cx88/cx88-mpeg.c b/drivers/media/video/cx88/cx88-mpeg.c index 512041451d38..6df5cf314186 100644 --- a/drivers/media/video/cx88/cx88-mpeg.c +++ b/drivers/media/video/cx88/cx88-mpeg.c | |||
@@ -807,7 +807,7 @@ static int __devinit cx8802_probe(struct pci_dev *pci_dev, | |||
807 | printk(KERN_INFO "%s() allocating %d frontend(s)\n", __func__, core->board.num_frontends); | 807 | printk(KERN_INFO "%s() allocating %d frontend(s)\n", __func__, core->board.num_frontends); |
808 | 808 | ||
809 | for (i = 1; i <= core->board.num_frontends; i++) { | 809 | for (i = 1; i <= core->board.num_frontends; i++) { |
810 | demod = videobuf_dvb_alloc_frontend(dev, &dev->frontends, i); | 810 | demod = videobuf_dvb_alloc_frontend(&dev->frontends, i); |
811 | if(demod == NULL) { | 811 | if(demod == NULL) { |
812 | printk(KERN_ERR "%s() failed to alloc\n", __func__); | 812 | printk(KERN_ERR "%s() failed to alloc\n", __func__); |
813 | err = -ENOMEM; | 813 | err = -ENOMEM; |
diff --git a/drivers/media/video/saa7134/saa7134-dvb.c b/drivers/media/video/saa7134/saa7134-dvb.c index 7d95a6928772..8c46115d4c79 100644 --- a/drivers/media/video/saa7134/saa7134-dvb.c +++ b/drivers/media/video/saa7134/saa7134-dvb.c | |||
@@ -958,7 +958,7 @@ static int dvb_init(struct saa7134_dev *dev) | |||
958 | 958 | ||
959 | printk(KERN_INFO "%s() allocating 1 frontend\n", __func__); | 959 | printk(KERN_INFO "%s() allocating 1 frontend\n", __func__); |
960 | 960 | ||
961 | if (videobuf_dvb_alloc_frontend(dev, &dev->frontends, 1) == NULL) { | 961 | if (videobuf_dvb_alloc_frontend(&dev->frontends, 1) == NULL) { |
962 | printk(KERN_ERR "%s() failed to alloc\n", __func__); | 962 | printk(KERN_ERR "%s() failed to alloc\n", __func__); |
963 | return -ENOMEM; | 963 | return -ENOMEM; |
964 | } | 964 | } |
diff --git a/drivers/media/video/videobuf-dvb.c b/drivers/media/video/videobuf-dvb.c index 7c74845af267..36b1e67ac330 100644 --- a/drivers/media/video/videobuf-dvb.c +++ b/drivers/media/video/videobuf-dvb.c | |||
@@ -307,10 +307,8 @@ void videobuf_dvb_unregister_bus(struct videobuf_dvb_frontends *f) | |||
307 | dvb_dmx_release(&fe->dvb.demux); | 307 | dvb_dmx_release(&fe->dvb.demux); |
308 | dvb_unregister_frontend(fe->dvb.frontend); | 308 | dvb_unregister_frontend(fe->dvb.frontend); |
309 | } | 309 | } |
310 | if(fe->dvb.frontend) { /* always allocated, may have been reset */ | 310 | if(fe->dvb.frontend) /* always allocated, may have been reset */ |
311 | dvb_frontend_detach(fe->dvb.frontend); | 311 | dvb_frontend_detach(fe->dvb.frontend); |
312 | fe->dvb.frontend = NULL; | ||
313 | } | ||
314 | list_del(list); | 312 | list_del(list); |
315 | kfree(fe); | 313 | kfree(fe); |
316 | } | 314 | } |
@@ -360,7 +358,7 @@ int videobuf_dvb_find_frontend(struct videobuf_dvb_frontends *f, struct dvb_fron | |||
360 | return ret; | 358 | return ret; |
361 | } | 359 | } |
362 | 360 | ||
363 | struct videobuf_dvb_frontend * videobuf_dvb_alloc_frontend(void *private, struct videobuf_dvb_frontends *f, int id) | 361 | struct videobuf_dvb_frontend * videobuf_dvb_alloc_frontend(struct videobuf_dvb_frontends *f, int id) |
364 | { | 362 | { |
365 | struct videobuf_dvb_frontend *fe; | 363 | struct videobuf_dvb_frontend *fe; |
366 | 364 | ||
@@ -368,7 +366,6 @@ struct videobuf_dvb_frontend * videobuf_dvb_alloc_frontend(void *private, struct | |||
368 | if (fe == NULL) | 366 | if (fe == NULL) |
369 | goto fail_alloc; | 367 | goto fail_alloc; |
370 | 368 | ||
371 | fe->dev = private; | ||
372 | fe->id = id; | 369 | fe->id = id; |
373 | mutex_init(&fe->dvb.lock); | 370 | mutex_init(&fe->dvb.lock); |
374 | 371 | ||