[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>
此提交包含在:
@@ -284,14 +284,6 @@ int tea5761_autodetection(struct i2c_adapter* i2c_adap, u8 i2c_addr)
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int tea5761_release(struct dvb_frontend *fe)
|
||||
{
|
||||
kfree(fe->tuner_priv);
|
||||
fe->tuner_priv = NULL;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int tea5761_get_frequency(struct dvb_frontend *fe, u32 *frequency)
|
||||
{
|
||||
struct tea5761_priv *priv = fe->tuner_priv;
|
||||
@@ -305,7 +297,7 @@ static const struct dvb_tuner_ops tea5761_tuner_ops = {
|
||||
},
|
||||
.set_analog_params = set_radio_freq,
|
||||
.sleep = set_radio_sleep,
|
||||
.release = tea5761_release,
|
||||
.release = dvb_tuner_simple_release,
|
||||
.get_frequency = tea5761_get_frequency,
|
||||
.get_status = tea5761_get_status,
|
||||
.get_rf_strength = tea5761_get_rf_strength,
|
||||
|
新增問題並參考
封鎖使用者