From 1bacb2df3bc999dcad21e9aab6bdb60d6dc7bc02 Mon Sep 17 00:00:00 2001 From: Ondrej Zary Date: Sat, 6 Apr 2013 14:29:29 -0300 Subject: [media] tda8290: change magic LNA config values to enum Use enum instead of magic values for LNA config in tda8290. Update tda827x, tda18271 and saa7134 to use the enum too. Signed-off-by: Ondrej Zary Signed-off-by: Michael Krufky Signed-off-by: Mauro Carvalho Chehab --- drivers/media/tuners/tda827x.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'drivers/media/tuners/tda827x.c') diff --git a/drivers/media/tuners/tda827x.c b/drivers/media/tuners/tda827x.c index a0d176267470..73453a255cdc 100644 --- a/drivers/media/tuners/tda827x.c +++ b/drivers/media/tuners/tda827x.c @@ -479,10 +479,10 @@ static void tda827xa_lna_gain(struct dvb_frontend *fe, int high, dprintk("setting LNA to low gain\n"); } switch (priv->cfg->config) { - case 0: /* no LNA */ + case TDA8290_LNA_OFF: /* no LNA */ break; - case 1: /* switch is GPIO 0 of tda8290 */ - case 2: + case TDA8290_LNA_GP0_HIGH_ON: /* switch is GPIO 0 of tda8290 */ + case TDA8290_LNA_GP0_HIGH_OFF: if (params == NULL) { gp_func = 0; arg = 0; @@ -499,11 +499,11 @@ static void tda827xa_lna_gain(struct dvb_frontend *fe, int high, DVB_FRONTEND_COMPONENT_TUNER, gp_func, arg); buf[1] = high ? 0 : 1; - if (priv->cfg->config == 2) + if (priv->cfg->config == TDA8290_LNA_GP0_HIGH_OFF) buf[1] = high ? 1 : 0; tuner_transfer(fe, &msg, 1); break; - case 3: /* switch with GPIO of saa713x */ + case TDA8290_LNA_ON_BRIDGE: /* switch with GPIO of saa713x */ if (fe->callback) fe->callback(priv->i2c_adap->algo_data, DVB_FRONTEND_COMPONENT_TUNER, 0, high); -- cgit v1.2.3-59-g8ed1b