diff options
author | Max Kellermann <max.kellermann@gmail.com> | 2016-08-09 23:32:26 +0200 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@s-opensource.com> | 2016-11-18 18:05:44 +0100 |
commit | 22a613e89825ea7a3984a968463cc6d425bd8856 (patch) | |
tree | ec1841642bf43f88cf9b89323315dfca7418d0d6 /drivers/media/dvb-frontends/dib0090.c | |
parent | [media] dvb-core/en50221: use dvb_remove_device() (diff) | |
download | linux-22a613e89825ea7a3984a968463cc6d425bd8856.tar.xz linux-22a613e89825ea7a3984a968463cc6d425bd8856.zip |
[media] dvb_frontend: merge duplicate dvb_tuner_ops.release implementations
Most release callback functions are identical: free the "tuner_priv"
and clear it. Let's eliminate some bloat by providing this simple
implementation in the dvb_frontend library.
Signed-off-by: Max Kellermann <max.kellermann@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
Diffstat (limited to 'drivers/media/dvb-frontends/dib0090.c')
-rw-r--r-- | drivers/media/dvb-frontends/dib0090.c | 11 |
1 files changed, 2 insertions, 9 deletions
diff --git a/drivers/media/dvb-frontends/dib0090.c b/drivers/media/dvb-frontends/dib0090.c index 16200582f089..7b4bee5c8e34 100644 --- a/drivers/media/dvb-frontends/dib0090.c +++ b/drivers/media/dvb-frontends/dib0090.c @@ -2526,13 +2526,6 @@ static int dib0090_tune(struct dvb_frontend *fe) return ret; } -static int dib0090_release(struct dvb_frontend *fe) -{ - kfree(fe->tuner_priv); - fe->tuner_priv = NULL; - return 0; -} - enum frontend_tune_state dib0090_get_tune_state(struct dvb_frontend *fe) { struct dib0090_state *state = fe->tuner_priv; @@ -2594,7 +2587,7 @@ static const struct dvb_tuner_ops dib0090_ops = { .frequency_max = 860000000, .frequency_step = 1000, }, - .release = dib0090_release, + .release = dvb_tuner_simple_release, .init = dib0090_wakeup, .sleep = dib0090_sleep, @@ -2609,7 +2602,7 @@ static const struct dvb_tuner_ops dib0090_fw_ops = { .frequency_max = 860000000, .frequency_step = 1000, }, - .release = dib0090_release, + .release = dvb_tuner_simple_release, .init = NULL, .sleep = NULL, |