Commit 93653467 authored by Andreas Oberritter's avatar Andreas Oberritter Committed by Linus Torvalds

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

Removed some useless functions and variables.
Signed-off-by: default avatarAndreas Oberritter <obi@linuxtv.org>
Signed-off-by: default avatarJohannes Stezenbach <js@linuxtv.org>
Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent 1e0ae280
......@@ -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 */
......@@ -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 dmx_demux *demux, u16 *pids)
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 *dvbdemux)
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 *dvbdemux)
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);
......@@ -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);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment