[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>
Этот коммит содержится в:
Max Kellermann
2016-08-09 18:32:26 -03:00
коммит произвёл Mauro Carvalho Chehab
родитель 4d5030b69b
Коммит 22a613e898
29 изменённых файлов: 46 добавлений и 245 удалений

Просмотреть файл

@@ -377,13 +377,6 @@ static int qt1010_init(struct dvb_frontend *fe)
return qt1010_set_params(fe);
}
static int qt1010_release(struct dvb_frontend *fe)
{
kfree(fe->tuner_priv);
fe->tuner_priv = NULL;
return 0;
}
static int qt1010_get_frequency(struct dvb_frontend *fe, u32 *frequency)
{
struct qt1010_priv *priv = fe->tuner_priv;
@@ -405,7 +398,7 @@ static const struct dvb_tuner_ops qt1010_tuner_ops = {
.frequency_step = QT1010_STEP,
},
.release = qt1010_release,
.release = dvb_tuner_simple_release,
.init = qt1010_init,
/* TODO: implement sleep */