diff options
author | Andreas Oberritter <obi@linuxtv.org> | 2005-09-09 16:02:23 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2005-09-09 16:57:36 -0400 |
commit | 936534676ef6c6af389eb9e61de7d725ee79a316 (patch) | |
tree | 743117d291c80197424aa8249eee9c16ad6e87ef | |
parent | 1e0ae280e91a4f69b08770c6ab72808711dd4f2b (diff) |
[PATCH] dvb: core: dvb_demux: remove unused cruft
Removed some useless functions and variables.
Signed-off-by: Andreas Oberritter <obi@linuxtv.org>
Signed-off-by: Johannes Stezenbach <js@linuxtv.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
-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 b86d03f5100b..608461f090fe 100644 --- a/drivers/media/dvb/dvb-core/demux.h +++ b/drivers/media/dvb/dvb-core/demux.h | |||
@@ -245,7 +245,6 @@ struct dmx_frontend { | |||
245 | struct dmx_demux { | 245 | struct dmx_demux { |
246 | u32 capabilities; /* Bitfield of capability flags */ | 246 | u32 capabilities; /* Bitfield of capability flags */ |
247 | struct dmx_frontend* frontend; /* Front-end connected to the demux */ | 247 | struct dmx_frontend* frontend; /* Front-end connected to the demux */ |
248 | struct list_head reg_list; /* List of registered demuxes */ | ||
249 | void* priv; /* Pointer to private data of the API client */ | 248 | void* priv; /* Pointer to private data of the API client */ |
250 | int users; /* Number of users */ | 249 | int users; /* Number of users */ |
251 | int (*open) (struct dmx_demux* demux); | 250 | int (*open) (struct dmx_demux* demux); |
@@ -291,16 +290,4 @@ struct dmx_demux { | |||
291 | u64 *stc, unsigned int *base); | 290 | u64 *stc, unsigned int *base); |
292 | }; | 291 | }; |
293 | 292 | ||
294 | /*--------------------------------------------------------------------------*/ | ||
295 | /* Demux directory */ | ||
296 | /*--------------------------------------------------------------------------*/ | ||
297 | |||
298 | /* | ||
299 | * DMX_DIR_ENTRY(): Casts elements in the list of registered | ||
300 | * demuxes from the generic type struct list_head* to the type struct dmx_demux | ||
301 | *. | ||
302 | */ | ||
303 | |||
304 | #define DMX_DIR_ENTRY(list) list_entry(list, struct dmx_demux, reg_list) | ||
305 | |||
306 | #endif /* #ifndef __DEMUX_H */ | 293 | #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 3d18d3eebcff..8774a94ef01b 100644 --- a/drivers/media/dvb/dvb-core/dvb_demux.c +++ b/drivers/media/dvb/dvb-core/dvb_demux.c | |||
@@ -39,33 +39,6 @@ | |||
39 | // #define DVB_DEMUX_SECTION_LOSS_LOG | 39 | // #define DVB_DEMUX_SECTION_LOSS_LOG |
40 | 40 | ||
41 | 41 | ||
42 | static LIST_HEAD(dmx_muxs); | ||
43 | |||
44 | |||
45 | static int dmx_register_demux(struct dmx_demux *demux) | ||
46 | { | ||
47 | demux->users = 0; | ||
48 | list_add(&demux->reg_list, &dmx_muxs); | ||
49 | return 0; | ||
50 | } | ||
51 | |||
52 | static int dmx_unregister_demux(struct dmx_demux* demux) | ||
53 | { | ||
54 | struct list_head *pos, *n, *head=&dmx_muxs; | ||
55 | |||
56 | list_for_each_safe (pos, n, head) { | ||
57 | if (DMX_DIR_ENTRY(pos) == demux) { | ||
58 | if (demux->users>0) | ||
59 | return -EINVAL; | ||
60 | list_del(pos); | ||
61 | return 0; | ||
62 | } | ||
63 | } | ||
64 | |||
65 | return -ENODEV; | ||
66 | } | ||
67 | |||
68 | |||
69 | /****************************************************************************** | 42 | /****************************************************************************** |
70 | * static inlined helper functions | 43 | * static inlined helper functions |
71 | ******************************************************************************/ | 44 | ******************************************************************************/ |
@@ -1207,7 +1180,7 @@ static int dvbdmx_get_pes_pids(struct dmx_demux *demux, u16 *pids) | |||
1207 | 1180 | ||
1208 | int dvb_dmx_init(struct dvb_demux *dvbdemux) | 1181 | int dvb_dmx_init(struct dvb_demux *dvbdemux) |
1209 | { | 1182 | { |
1210 | int i, err; | 1183 | int i; |
1211 | struct dmx_demux *dmx = &dvbdemux->dmx; | 1184 | struct dmx_demux *dmx = &dvbdemux->dmx; |
1212 | 1185 | ||
1213 | dvbdemux->users = 0; | 1186 | dvbdemux->users = 0; |
@@ -1250,7 +1223,6 @@ int dvb_dmx_init(struct dvb_demux *dvbdemux) | |||
1250 | dvbdemux->memcopy = dvb_dmx_memcopy; | 1223 | dvbdemux->memcopy = dvb_dmx_memcopy; |
1251 | 1224 | ||
1252 | dmx->frontend = NULL; | 1225 | dmx->frontend = NULL; |
1253 | dmx->reg_list.prev = dmx->reg_list.next = &dmx->reg_list; | ||
1254 | dmx->priv = (void *) dvbdemux; | 1226 | dmx->priv = (void *) dvbdemux; |
1255 | dmx->open = dvbdmx_open; | 1227 | dmx->open = dvbdmx_open; |
1256 | dmx->close = dvbdmx_close; | 1228 | dmx->close = dvbdmx_close; |
@@ -1273,21 +1245,14 @@ int dvb_dmx_init(struct dvb_demux *dvbdemux) | |||
1273 | sema_init(&dvbdemux->mutex, 1); | 1245 | sema_init(&dvbdemux->mutex, 1); |
1274 | spin_lock_init(&dvbdemux->lock); | 1246 | spin_lock_init(&dvbdemux->lock); |
1275 | 1247 | ||
1276 | if ((err = dmx_register_demux(dmx)) < 0) | ||
1277 | return err; | ||
1278 | |||
1279 | return 0; | 1248 | return 0; |
1280 | } | 1249 | } |
1281 | EXPORT_SYMBOL(dvb_dmx_init); | 1250 | EXPORT_SYMBOL(dvb_dmx_init); |
1282 | 1251 | ||
1283 | 1252 | ||
1284 | int dvb_dmx_release(struct dvb_demux *dvbdemux) | 1253 | void dvb_dmx_release(struct dvb_demux *dvbdemux) |
1285 | { | 1254 | { |
1286 | struct dmx_demux *dmx = &dvbdemux->dmx; | ||
1287 | |||
1288 | dmx_unregister_demux(dmx); | ||
1289 | vfree(dvbdemux->filter); | 1255 | vfree(dvbdemux->filter); |
1290 | vfree(dvbdemux->feed); | 1256 | vfree(dvbdemux->feed); |
1291 | return 0; | ||
1292 | } | 1257 | } |
1293 | EXPORT_SYMBOL(dvb_dmx_release); | 1258 | 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 c09beb391622..20275a2f6ec6 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 { | |||
138 | 138 | ||
139 | 139 | ||
140 | int dvb_dmx_init(struct dvb_demux *dvbdemux); | 140 | int dvb_dmx_init(struct dvb_demux *dvbdemux); |
141 | int dvb_dmx_release(struct dvb_demux *dvbdemux); | 141 | void dvb_dmx_release(struct dvb_demux *dvbdemux); |
142 | void dvb_dmx_swfilter_packets(struct dvb_demux *dvbdmx, const u8 *buf, size_t count); | 142 | void dvb_dmx_swfilter_packets(struct dvb_demux *dvbdmx, const u8 *buf, size_t count); |
143 | void dvb_dmx_swfilter(struct dvb_demux *demux, const u8 *buf, size_t count); | 143 | void dvb_dmx_swfilter(struct dvb_demux *demux, const u8 *buf, size_t count); |
144 | void dvb_dmx_swfilter_204(struct dvb_demux *demux, const u8 *buf, size_t count); | 144 | void dvb_dmx_swfilter_204(struct dvb_demux *demux, const u8 *buf, size_t count); |