Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=d2c932a1f7aca16727ce6670c5eccb0a4e2b47a5
Commit:     d2c932a1f7aca16727ce6670c5eccb0a4e2b47a5
Parent:     0e1fab90a8a76e09b669d3159ec910eab7ee97d6
Author:     Michael Krufky <[EMAIL PROTECTED]>
AuthorDate: Sat Jan 5 15:42:54 2008 -0300
Committer:  Mauro Carvalho Chehab <[EMAIL PROTECTED]>
CommitDate: Fri Jan 25 19:04:38 2008 -0200

    V4L/DVB (6965): tda18271: fix analog tuning regression caused by earlier 
changeset
    
    An earlier patch, "tda18271: fail table lookups if frequency is out of 
range"
    broke analog support on certain hardware.  This patch fixes that problem, by
    allowing the RF_CAL byte to be set to the maximum value, in cases of the
    frequency being out of range.
    
    Signed-off-by: Michael Krufky <[EMAIL PROTECTED]>
    Signed-off-by: Mauro Carvalho Chehab <[EMAIL PROTECTED]>
---
 drivers/media/dvb/frontends/tda18271-common.c |    8 +++-----
 drivers/media/dvb/frontends/tda18271-tables.c |    4 ++--
 2 files changed, 5 insertions(+), 7 deletions(-)

diff --git a/drivers/media/dvb/frontends/tda18271-common.c 
b/drivers/media/dvb/frontends/tda18271-common.c
index 4adc739..d7a3356 100644
--- a/drivers/media/dvb/frontends/tda18271-common.c
+++ b/drivers/media/dvb/frontends/tda18271-common.c
@@ -601,13 +601,11 @@ int tda18271_calc_rf_cal(struct dvb_frontend *fe, u32 
*freq)
        unsigned char *regs = priv->tda18271_regs;
        u8 val;
 
-       int ret = tda18271_lookup_map(fe, RF_CAL, freq, &val);
-       if (ret < 0)
-               goto fail;
+       tda18271_lookup_map(fe, RF_CAL, freq, &val);
 
        regs[R_EB14] = val;
-fail:
-       return ret;
+
+       return 0;
 }
 
 /*
diff --git a/drivers/media/dvb/frontends/tda18271-tables.c 
b/drivers/media/dvb/frontends/tda18271-tables.c
index 528a2ec..0402c7d 100644
--- a/drivers/media/dvb/frontends/tda18271-tables.c
+++ b/drivers/media/dvb/frontends/tda18271-tables.c
@@ -1098,7 +1098,7 @@ int tda18271_lookup_pll_map(struct dvb_frontend *fe,
        }
 
        while ((map[i].lomax * 1000) < *freq) {
-               if (map[i].lomax == 0) {
+               if (map[i + 1].lomax == 0) {
                        tda_map("%s: frequency (%d) out of range\n",
                                map_name, *freq);
                        ret = -ERANGE;
@@ -1169,7 +1169,7 @@ int tda18271_lookup_map(struct dvb_frontend *fe,
        }
 
        while ((map[i].rfmax * 1000) < *freq) {
-               if (map[i].rfmax == 0) {
+               if (map[i + 1].rfmax == 0) {
                        tda_map("%s: frequency (%d) out of range\n",
                                map_name, *freq);
                        ret = -ERANGE;
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to