media: dvb_frontend: get rid of get_property() callback
authorMauro Carvalho Chehab <mchehab@s-opensource.com>
Fri, 5 Jun 2020 16:25:02 +0000 (09:25 -0700)
committerSasha Levin <sashal@kernel.org>
Tue, 30 Jun 2020 19:38:34 +0000 (15:38 -0400)
commit 8f8a19fcc1a89b83d0ab6d7cf2bcdd272dbd4334 upstream

Only lg2160 implement gets_property, but there's no need for that,
as no other driver calls this callback, as get_frontend() does the
same, and set_frontend() also calls lg2160 get_frontend().

So, get rid of it.

Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
Reviewed-by: Michael Ira Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/media/dvb-core/dvb_frontend.c
drivers/media/dvb-core/dvb_frontend.h
drivers/media/dvb-frontends/lg2160.c

index 7eeb5d3..97c825f 100644 (file)
@@ -1306,7 +1306,7 @@ static int dtv_property_process_get(struct dvb_frontend *fe,
                                    struct dtv_property *tvp,
                                    struct file *file)
 {
-       int r, ncaps;
+       int ncaps;
 
        switch(tvp->cmd) {
        case DTV_ENUM_DELSYS:
@@ -1517,13 +1517,6 @@ static int dtv_property_process_get(struct dvb_frontend *fe,
                return -EINVAL;
        }
 
-       /* Allow the frontend to override outgoing properties */
-       if (fe->ops.get_property) {
-               r = fe->ops.get_property(fe, tvp);
-               if (r < 0)
-                       return r;
-       }
-
        dtv_property_dump(fe, false, tvp);
 
        return 0;
index fb6e848..57cedbe 100644 (file)
@@ -399,8 +399,6 @@ struct dtv_frontend_properties;
  * @analog_ops:                pointer to struct analog_demod_ops
  * @set_property:      callback function to allow the frontend to validade
  *                     incoming properties. Should not be used on new drivers.
- * @get_property:      callback function to allow the frontend to override
- *                     outcoming properties. Should not be used on new drivers.
  */
 struct dvb_frontend_ops {
 
@@ -463,7 +461,6 @@ struct dvb_frontend_ops {
        struct analog_demod_ops analog_ops;
 
        int (*set_property)(struct dvb_frontend* fe, struct dtv_property* tvp);
-       int (*get_property)(struct dvb_frontend* fe, struct dtv_property* tvp);
 };
 
 #ifdef __DVB_CORE__
index f51a3a0..1b64065 100644 (file)
@@ -1052,16 +1052,6 @@ fail:
        return ret;
 }
 
-static int lg216x_get_property(struct dvb_frontend *fe,
-                              struct dtv_property *tvp)
-{
-       struct dtv_frontend_properties *c = &fe->dtv_property_cache;
-
-       return (DTV_ATSCMH_FIC_VER == tvp->cmd) ?
-               lg216x_get_frontend(fe, c) : 0;
-}
-
-
 static int lg2160_set_frontend(struct dvb_frontend *fe)
 {
        struct lg216x_state *state = fe->demodulator_priv;
@@ -1372,8 +1362,6 @@ static struct dvb_frontend_ops lg2160_ops = {
        .init                 = lg216x_init,
        .sleep                = lg216x_sleep,
 #endif
-       .get_property         = lg216x_get_property,
-
        .set_frontend         = lg2160_set_frontend,
        .get_frontend         = lg216x_get_frontend,
        .get_tune_settings    = lg216x_get_tune_settings,
@@ -1400,8 +1388,6 @@ static struct dvb_frontend_ops lg2161_ops = {
        .init                 = lg216x_init,
        .sleep                = lg216x_sleep,
 #endif
-       .get_property         = lg216x_get_property,
-
        .set_frontend         = lg2160_set_frontend,
        .get_frontend         = lg216x_get_frontend,
        .get_tune_settings    = lg216x_get_tune_settings,