aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/dvb/frontends
diff options
context:
space:
mode:
authorMauro Carvalho Chehab <mchehab@redhat.com>2011-07-10 09:26:06 -0400
committerMauro Carvalho Chehab <mchehab@redhat.com>2011-07-27 16:55:50 -0400
commitcf694b141ea2973179756fd572dd5cdd064e1abf (patch)
tree47aabe92cdf1dad9f08f15e5c07e79ef50930427 /drivers/media/dvb/frontends
parent90796acad0027db957a282787a4dab7d0bb52ef1 (diff)
[media] drxk: Fix driver removal
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media/dvb/frontends')
-rw-r--r--drivers/media/dvb/frontends/drxk_hard.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/drivers/media/dvb/frontends/drxk_hard.c b/drivers/media/dvb/frontends/drxk_hard.c
index aaef8e35698b..7ea73dfacdfb 100644
--- a/drivers/media/dvb/frontends/drxk_hard.c
+++ b/drivers/media/dvb/frontends/drxk_hard.c
@@ -6431,6 +6431,18 @@ struct dvb_frontend *drxk_attach(const struct drxk_config *config,
6431 if (init_drxk(state) < 0) 6431 if (init_drxk(state) < 0)
6432 goto error; 6432 goto error;
6433 *fe_t = &state->t_frontend; 6433 *fe_t = &state->t_frontend;
6434
6435#ifdef CONFIG_MEDIA_ATTACH
6436 /*
6437 * HACK: As this function initializes both DVB-T and DVB-C fe symbols,
6438 * and calling it twice would create the state twice, leading into
6439 * memory leaks, the right way is to call it only once. However, dvb
6440 * release functions will call symbol_put twice. So, the solution is to
6441 * artificially increment the usage count, in order to allow the
6442 * driver to be released.
6443 */
6444 symbol_get(drxk_attach);
6445#endif
6434 return &state->c_frontend; 6446 return &state->c_frontend;
6435 6447
6436error: 6448error: