summaryrefslogtreecommitdiffstats
path: root/drivers/media/dvb-frontends/zl10036.c
diff options
context:
space:
mode:
authorMax Kellermann <max.kellermann@gmail.com>2016-08-09 23:32:26 +0200
committerMauro Carvalho Chehab <mchehab@s-opensource.com>2016-11-18 18:05:44 +0100
commit22a613e89825ea7a3984a968463cc6d425bd8856 (patch)
treeec1841642bf43f88cf9b89323315dfca7418d0d6 /drivers/media/dvb-frontends/zl10036.c
parent[media] dvb-core/en50221: use dvb_remove_device() (diff)
downloadlinux-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/zl10036.c')
-rw-r--r--drivers/media/dvb-frontends/zl10036.c12
1 files changed, 1 insertions, 11 deletions
diff --git a/drivers/media/dvb-frontends/zl10036.c b/drivers/media/dvb-frontends/zl10036.c
index df5d0fe24687..0116557c0f10 100644
--- a/drivers/media/dvb-frontends/zl10036.c
+++ b/drivers/media/dvb-frontends/zl10036.c
@@ -134,16 +134,6 @@ static int zl10036_write(struct zl10036_state *state, u8 buf[], u8 count)
return 0;
}
-static int zl10036_release(struct dvb_frontend *fe)
-{
- struct zl10036_state *state = fe->tuner_priv;
-
- fe->tuner_priv = NULL;
- kfree(state);
-
- return 0;
-}
-
static int zl10036_sleep(struct dvb_frontend *fe)
{
struct zl10036_state *state = fe->tuner_priv;
@@ -453,7 +443,7 @@ static const struct dvb_tuner_ops zl10036_tuner_ops = {
.frequency_max = 2175000
},
.init = zl10036_init,
- .release = zl10036_release,
+ .release = dvb_tuner_simple_release,
.sleep = zl10036_sleep,
.set_params = zl10036_set_params,
.get_frequency = zl10036_get_frequency,