diff options
Diffstat (limited to 'drivers/media/dvb')
-rw-r--r-- | drivers/media/dvb/dvb-core/demux.h | 13 | ||||
-rw-r--r-- | drivers/media/dvb/dvb-core/dvb_demux.c | 39 | ||||
-rw-r--r-- | 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 index b86d03f5100..608461f090f 100644 --- 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 index 3d18d3eebcf..8774a94ef01 100644 --- 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 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); diff --git a/drivers/media/dvb/dvb-core/dvb_demux.h b/drivers/media/dvb/dvb-core/dvb_demux.h index c09beb39162..20275a2f6ec 100644 --- 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); |