X-Git-Url: http://git.rot13.org/?a=blobdiff_plain;f=drivers%2Fmedia%2Fdvb%2Fbt8xx%2Fdst.c;h=9f72b7000c080281e6149318a730b814348a9baf;hb=bbc7610c062074468f362b37d33603536e87fb96;hp=52b6fb2455f9670e8e33dd8d78b9f0ae67f133bd;hpb=0912ad0b0fdee374f1f49d75fee341980f0868b6;p=powerpc.git diff --git a/drivers/media/dvb/bt8xx/dst.c b/drivers/media/dvb/bt8xx/dst.c index 52b6fb2455..9f72b7000c 100644 --- a/drivers/media/dvb/bt8xx/dst.c +++ b/drivers/media/dvb/bt8xx/dst.c @@ -1715,6 +1715,15 @@ static int dst_get_frontend(struct dvb_frontend *fe, struct dvb_frontend_paramet static void dst_release(struct dvb_frontend *fe) { struct dst_state *state = fe->demodulator_priv; + if (state->dst_ca) { + dvb_unregister_device(state->dst_ca); +#ifdef CONFIG_DVB_CORE_ATTACH + symbol_put(dst_ca_attach); +#endif + } +#ifdef CONFIG_DVB_CORE_ATTACH + symbol_put(dst_attach); +#endif kfree(state); } @@ -1752,11 +1761,6 @@ struct dst_state *dst_attach(struct dst_state *state, struct dvb_adapter *dvb_ad } state->frontend.demodulator_priv = state; - /* Attach other DST peripherals if any */ - /* Conditional Access device */ - if (state->dst_hw_cap & DST_TYPE_HAS_CA) - dst_ca_attach(state, dvb_adapter); - return state; /* Manu (DST is a card not a frontend) */ }