[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>
This commit is contained in:
Max Kellermann
2016-08-09 18:32:26 -03:00
committed by Mauro Carvalho Chehab
vanhempi 4d5030b69b
commit 22a613e898
29 muutettua tiedostoa jossa 46 lisäystä ja 245 poistoa

Näytä tiedosto

@@ -296,13 +296,6 @@ static int mt2266_sleep(struct dvb_frontend *fe)
return 0;
}
static int mt2266_release(struct dvb_frontend *fe)
{
kfree(fe->tuner_priv);
fe->tuner_priv = NULL;
return 0;
}
static const struct dvb_tuner_ops mt2266_tuner_ops = {
.info = {
.name = "Microtune MT2266",
@@ -310,7 +303,7 @@ static const struct dvb_tuner_ops mt2266_tuner_ops = {
.frequency_max = 862000000,
.frequency_step = 50000,
},
.release = mt2266_release,
.release = dvb_tuner_simple_release,
.init = mt2266_init,
.sleep = mt2266_sleep,
.set_params = mt2266_set_params,