diff options
author | Ondrej Zary <linux@rainbow-software.org> | 2013-04-06 13:29:29 -0400 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2013-04-08 06:05:15 -0400 |
commit | 1bacb2df3bc999dcad21e9aab6bdb60d6dc7bc02 (patch) | |
tree | fcbd760fce71aac385869988b446553b55a1dd9a /drivers/media/tuners/tda18271-fe.c | |
parent | 34fe2784b4aabeec6d2afbd132d070b20abea132 (diff) |
[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 <linux@rainbow-software.org>
Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media/tuners/tda18271-fe.c')
-rw-r--r-- | drivers/media/tuners/tda18271-fe.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/drivers/media/tuners/tda18271-fe.c b/drivers/media/tuners/tda18271-fe.c index e7786862dab2..4995b890c164 100644 --- a/drivers/media/tuners/tda18271-fe.c +++ b/drivers/media/tuners/tda18271-fe.c | |||
@@ -21,6 +21,7 @@ | |||
21 | #include <linux/delay.h> | 21 | #include <linux/delay.h> |
22 | #include <linux/videodev2.h> | 22 | #include <linux/videodev2.h> |
23 | #include "tda18271-priv.h" | 23 | #include "tda18271-priv.h" |
24 | #include "tda8290.h" | ||
24 | 25 | ||
25 | int tda18271_debug; | 26 | int tda18271_debug; |
26 | module_param_named(debug, tda18271_debug, int, 0644); | 27 | module_param_named(debug, tda18271_debug, int, 0644); |
@@ -867,12 +868,12 @@ static int tda18271_agc(struct dvb_frontend *fe) | |||
867 | int ret = 0; | 868 | int ret = 0; |
868 | 869 | ||
869 | switch (priv->config) { | 870 | switch (priv->config) { |
870 | case 0: | 871 | case TDA8290_LNA_OFF: |
871 | /* no external agc configuration required */ | 872 | /* no external agc configuration required */ |
872 | if (tda18271_debug & DBG_ADV) | 873 | if (tda18271_debug & DBG_ADV) |
873 | tda_dbg("no agc configuration provided\n"); | 874 | tda_dbg("no agc configuration provided\n"); |
874 | break; | 875 | break; |
875 | case 3: | 876 | case TDA8290_LNA_ON_BRIDGE: |
876 | /* switch with GPIO of saa713x */ | 877 | /* switch with GPIO of saa713x */ |
877 | tda_dbg("invoking callback\n"); | 878 | tda_dbg("invoking callback\n"); |
878 | if (fe->callback) | 879 | if (fe->callback) |
@@ -881,8 +882,8 @@ static int tda18271_agc(struct dvb_frontend *fe) | |||
881 | TDA18271_CALLBACK_CMD_AGC_ENABLE, | 882 | TDA18271_CALLBACK_CMD_AGC_ENABLE, |
882 | priv->mode); | 883 | priv->mode); |
883 | break; | 884 | break; |
884 | case 1: | 885 | case TDA8290_LNA_GP0_HIGH_ON: |
885 | case 2: | 886 | case TDA8290_LNA_GP0_HIGH_OFF: |
886 | default: | 887 | default: |
887 | /* n/a - currently not supported */ | 888 | /* n/a - currently not supported */ |
888 | tda_err("unsupported configuration: %d\n", priv->config); | 889 | tda_err("unsupported configuration: %d\n", priv->config); |