]> pilppa.com Git - linux-2.6-omap-h63xx.git/commitdiff
V4L/DVB (9265): videobuf: data storage optimisation
authorDarron Broad <darron@kewl.org>
Wed, 15 Oct 2008 16:43:41 +0000 (13:43 -0300)
committerMauro Carvalho Chehab <mchehab@redhat.com>
Fri, 17 Oct 2008 20:28:31 +0000 (17:28 -0300)
To optimise data storage redundant vars are removed.

Signed-off-by: Darron Broad <darron@kewl.org>
Signed-off-by: Steven Toth <stoth@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
drivers/media/video/cx23885/cx23885-core.c
drivers/media/video/cx88/cx88-mpeg.c
drivers/media/video/saa7134/saa7134-dvb.c
drivers/media/video/videobuf-dvb.c
include/media/videobuf-dvb.h

index 110e2ed2061ddcec8bac3218462e31c17d85ae53..8f6fb2add7dea0c895c030597c0a5b9757c2155f 100644 (file)
@@ -643,7 +643,7 @@ static int cx23885_init_tsport(struct cx23885_dev *dev,
        init_timer(&port->mpegq.timeout);
 
        mutex_init(&port->frontends.lock);
-       INIT_LIST_HEAD(&port->frontends.frontend.felist);
+       INIT_LIST_HEAD(&port->frontends.felist);
        port->frontends.active_fe_id = 0;
 
        /* This should be hardcoded allow a single frontend
index 1d8c8dd3006a06421a1c6a934392a0bdd4b7e621..512041451d38301b00796bc9ab3be6613ece679d 100644 (file)
@@ -802,7 +802,7 @@ static int __devinit cx8802_probe(struct pci_dev *pci_dev,
        list_add_tail(&dev->devlist,&cx8802_devlist);
 
        mutex_init(&dev->frontends.lock);
-       INIT_LIST_HEAD(&dev->frontends.frontend.felist);
+       INIT_LIST_HEAD(&dev->frontends.felist);
 
        printk(KERN_INFO "%s() allocating %d frontend(s)\n", __func__, core->board.num_frontends);
 
index d2d238912fbf23c550e9298e8a8f5f63284d4d8d..7d95a6928772c6ba5ca9b4ffc070949e58edda65 100644 (file)
@@ -953,7 +953,7 @@ static int dvb_init(struct saa7134_dev *dev)
 
        /* FIXME: add support for multi-frontend */
        mutex_init(&dev->frontends.lock);
-       INIT_LIST_HEAD(&dev->frontends.frontend.felist);
+       INIT_LIST_HEAD(&dev->frontends.felist);
        dev->frontends.active_fe_id = 0;
 
        printk(KERN_INFO "%s() allocating 1 frontend\n", __func__);
index af0b75cda6fdb3f63d9cac45630d14453e98893e..fc4cfaa7bf5f083e7187acaf1d4af52cdee35082 100644 (file)
@@ -162,9 +162,8 @@ int videobuf_dvb_register_bus(struct videobuf_dvb_frontends *f,
 
        /* Attach all of the frontends to the adapter */
        mutex_lock(&f->lock);
-       list_for_each_safe(list, q, &f->frontend.felist) {
+       list_for_each_safe(list, q, &f->felist) {
                fe = list_entry(list, struct videobuf_dvb_frontend, felist);
-
                res = videobuf_dvb_register_frontend(&f->adapter, &fe->dvb);
                if (res < 0) {
                        printk(KERN_WARNING "%s: videobuf_dvb_register_frontend failed (errno = %d)\n",
@@ -290,7 +289,7 @@ void videobuf_dvb_unregister_bus(struct videobuf_dvb_frontends *f)
        struct videobuf_dvb_frontend *fe;
 
        mutex_lock(&f->lock);
-       list_for_each_safe(list, q, &f->frontend.felist) {
+       list_for_each_safe(list, q, &f->felist) {
                fe = list_entry(list, struct videobuf_dvb_frontend, felist);
 
                dvb_net_release(&fe->dvb.net);
@@ -316,7 +315,7 @@ struct videobuf_dvb_frontend * videobuf_dvb_get_frontend(struct videobuf_dvb_fro
 
        mutex_lock(&f->lock);
 
-       list_for_each_safe(list, q, &f->frontend.felist) {
+       list_for_each_safe(list, q, &f->felist) {
                fe = list_entry(list, struct videobuf_dvb_frontend, felist);
                if (fe->id == id) {
                        ret = fe;
@@ -337,7 +336,7 @@ int videobuf_dvb_find_frontend(struct videobuf_dvb_frontends *f, struct dvb_fron
 
        mutex_lock(&f->lock);
 
-       list_for_each_safe(list, q, &f->frontend.felist) {
+       list_for_each_safe(list, q, &f->felist) {
                fe = list_entry(list, struct videobuf_dvb_frontend, felist);
                if (fe->dvb.frontend == p) {
                        ret = fe->id;
@@ -363,7 +362,7 @@ struct videobuf_dvb_frontend * videobuf_dvb_alloc_frontend(void *private, struct
        mutex_init(&fe->dvb.lock);
 
        mutex_lock(&f->lock);
-       list_add_tail(&fe->felist,&f->frontend.felist);
+       list_add_tail(&fe->felist,&f->felist);
        mutex_unlock(&f->lock);
 
 fail_alloc:
index 1a401f7320b9ed8b2afb464ae02d65e6cafd5de9..069215c77a657e9e3404391e65796452f9a2df62 100644 (file)
@@ -16,7 +16,6 @@ struct videobuf_dvb {
        int                        nfeeds;
 
        /* videobuf_dvb_(un)register manges this */
-       struct dvb_adapter         adapter;
        struct dvb_demux           demux;
        struct dmxdev              dmxdev;
        struct dmx_frontend        fe_hw;
@@ -25,17 +24,17 @@ struct videobuf_dvb {
 };
 
 struct videobuf_dvb_frontend {
-       void *dev;
        struct list_head felist;
+       void *dev;
        int id;
        struct videobuf_dvb dvb;
 };
 
 struct videobuf_dvb_frontends {
+       struct list_head felist;
        struct mutex lock;
        struct dvb_adapter adapter;
        int active_fe_id; /* Indicates which frontend in the felist is in use */
-       struct videobuf_dvb_frontend frontend;
        int gate; /* Frontend with gate control 0=!MFE,1=fe0,2=fe1 etc */
 };