tree 743117d291c80197424aa8249eee9c16ad6e87ef
parent 1e0ae280e91a4f69b08770c6ab72808711dd4f2b
author Andreas Oberritter <[EMAIL PROTECTED]> Sat, 10 Sep 2005 03:02:23 -0700
committer Linus Torvalds <[EMAIL PROTECTED]> Sat, 10 Sep 2005 03:57:36 -0700

[PATCH] dvb: core: dvb_demux: remove unused cruft

Removed some useless functions and variables.

Signed-off-by: Andreas Oberritter <[EMAIL PROTECTED]>
Signed-off-by: Johannes Stezenbach <[EMAIL PROTECTED]>
Signed-off-by: Andrew Morton <[EMAIL PROTECTED]>
Signed-off-by: Linus Torvalds <[EMAIL PROTECTED]>

 drivers/media/dvb/dvb-core/demux.h     |   13 -----------
 drivers/media/dvb/dvb-core/dvb_demux.c |   39 +--------------------------------
 drivers/media/dvb/dvb-core/dvb_demux.h |    2 -
 3 files changed, 3 insertions(+), 51 deletions(-)

diff --git a/drivers/media/dvb/dvb-core/demux.h 
b/drivers/media/dvb/dvb-core/demux.h
--- a/drivers/media/dvb/dvb-core/demux.h
+++ b/drivers/media/dvb/dvb-core/demux.h
@@ -245,7 +245,6 @@ struct dmx_frontend {
 struct dmx_demux {
         u32 capabilities;            /* Bitfield of capability flags */
         struct dmx_frontend* frontend;    /* Front-end connected to the demux 
*/
-        struct list_head reg_list;   /* List of registered demuxes */
         void* priv;                  /* Pointer to private data of the API 
client */
         int users;                   /* Number of users */
         int (*open) (struct dmx_demux* demux);
@@ -291,16 +290,4 @@ struct dmx_demux {
                        u64 *stc, unsigned int *base);
 };
 
-/*--------------------------------------------------------------------------*/
-/* Demux directory */
-/*--------------------------------------------------------------------------*/
-
-/*
- * DMX_DIR_ENTRY(): Casts elements in the list of registered
- * demuxes from the generic type struct list_head* to the type struct dmx_demux
- *.
- */
-
-#define DMX_DIR_ENTRY(list) list_entry(list, struct dmx_demux, reg_list)
-
 #endif /* #ifndef __DEMUX_H */
diff --git a/drivers/media/dvb/dvb-core/dvb_demux.c 
b/drivers/media/dvb/dvb-core/dvb_demux.c
--- a/drivers/media/dvb/dvb-core/dvb_demux.c
+++ b/drivers/media/dvb/dvb-core/dvb_demux.c
@@ -39,33 +39,6 @@
 // #define DVB_DEMUX_SECTION_LOSS_LOG
 
 
-static LIST_HEAD(dmx_muxs);
-
-
-static int dmx_register_demux(struct dmx_demux *demux)
-{
-       demux->users = 0;
-       list_add(&demux->reg_list, &dmx_muxs);
-       return 0;
-}
-
-static int dmx_unregister_demux(struct dmx_demux* demux)
-{
-       struct list_head *pos, *n, *head=&dmx_muxs;
-
-       list_for_each_safe (pos, n, head) {
-               if (DMX_DIR_ENTRY(pos) == demux) {
-                       if (demux->users>0)
-                               return -EINVAL;
-                       list_del(pos);
-                       return 0;
-               }
-       }
-
-       return -ENODEV;
-}
-
-
 /******************************************************************************
  * static inlined helper functions
  
******************************************************************************/
@@ -1207,7 +1180,7 @@ static int dvbdmx_get_pes_pids(struct dm
 
 int dvb_dmx_init(struct dvb_demux *dvbdemux)
 {
-       int i, err;
+       int i;
        struct dmx_demux *dmx = &dvbdemux->dmx;
 
        dvbdemux->users = 0;
@@ -1250,7 +1223,6 @@ int dvb_dmx_init(struct dvb_demux *dvbde
                 dvbdemux->memcopy = dvb_dmx_memcopy;
 
        dmx->frontend = NULL;
-       dmx->reg_list.prev = dmx->reg_list.next = &dmx->reg_list;
        dmx->priv = (void *) dvbdemux;
        dmx->open = dvbdmx_open;
        dmx->close = dvbdmx_close;
@@ -1273,21 +1245,14 @@ int dvb_dmx_init(struct dvb_demux *dvbde
        sema_init(&dvbdemux->mutex, 1);
        spin_lock_init(&dvbdemux->lock);
 
-       if ((err = dmx_register_demux(dmx)) < 0)
-               return err;
-
        return 0;
 }
 EXPORT_SYMBOL(dvb_dmx_init);
 
 
-int dvb_dmx_release(struct dvb_demux *dvbdemux)
+void dvb_dmx_release(struct dvb_demux *dvbdemux)
 {
-       struct dmx_demux *dmx = &dvbdemux->dmx;
-
-       dmx_unregister_demux(dmx);
        vfree(dvbdemux->filter);
        vfree(dvbdemux->feed);
-       return 0;
 }
 EXPORT_SYMBOL(dvb_dmx_release);
diff --git a/drivers/media/dvb/dvb-core/dvb_demux.h 
b/drivers/media/dvb/dvb-core/dvb_demux.h
--- a/drivers/media/dvb/dvb-core/dvb_demux.h
+++ b/drivers/media/dvb/dvb-core/dvb_demux.h
@@ -138,7 +138,7 @@ struct dvb_demux {
 
 
 int dvb_dmx_init(struct dvb_demux *dvbdemux);
-int dvb_dmx_release(struct dvb_demux *dvbdemux);
+void dvb_dmx_release(struct dvb_demux *dvbdemux);
 void dvb_dmx_swfilter_packets(struct dvb_demux *dvbdmx, const u8 *buf, size_t 
count);
 void dvb_dmx_swfilter(struct dvb_demux *demux, const u8 *buf, size_t count);
 void dvb_dmx_swfilter_204(struct dvb_demux *demux, const u8 *buf, size_t 
count);
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to