summaryrefslogtreecommitdiffstats
path: root/drivers/media/dvb-frontends/tda10071.c
diff options
context:
space:
mode:
authorAndreas Matthies <a.matthies@gmx.net>2013-09-30 18:08:16 +0200
committerMauro Carvalho Chehab <m.chehab@samsung.com>2013-10-02 11:48:14 +0200
commit6894c070e1f23492239a2e5d6777cb1451620bda (patch)
treeda23810ed2d4d471a2badda4e4a99698d8686935 /drivers/media/dvb-frontends/tda10071.c
parent[media] fc001[23]: Change variable type to bool (diff)
downloadlinux-6894c070e1f23492239a2e5d6777cb1451620bda.tar.xz
linux-6894c070e1f23492239a2e5d6777cb1451620bda.zip
[media] tda10071: change firmware download condition
Reading firmware status register to detect whether firmware is running or not didn't work 100% reliably. That register was likely set by firmware itself which means it could not contain reasonable values until firmware is up and running. Usually it just worked as some garbage value was returned accidentally but it appears that in some cases returned garbage value was 0x00 which was considered "firmware is up and running" by the driver and firmware loading was skipped leaving device to non-working state. Fix problem by removing unreliable check and let the driver keep count whether firmware is loaded or not. Signed-off-by: Andreas Matthies <a.matthies@gmx.net> Signed-off-by: Antti Palosaari <crope@iki.fi> Signed-off-by: Michael Krufky <mkrufky@linuxtv.org> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
Diffstat (limited to 'drivers/media/dvb-frontends/tda10071.c')
-rw-r--r--drivers/media/dvb-frontends/tda10071.c9
1 files changed, 1 insertions, 8 deletions
diff --git a/drivers/media/dvb-frontends/tda10071.c b/drivers/media/dvb-frontends/tda10071.c
index 2521f7e23018..e79749cfec81 100644
--- a/drivers/media/dvb-frontends/tda10071.c
+++ b/drivers/media/dvb-frontends/tda10071.c
@@ -912,14 +912,8 @@ static int tda10071_init(struct dvb_frontend *fe)
{ 0xd5, 0x03, 0x03 },
};
- /* firmware status */
- ret = tda10071_rd_reg(priv, 0x51, &tmp);
- if (ret)
- goto error;
-
- if (!tmp) {
+ if (priv->warm) {
/* warm state - wake up device from sleep */
- priv->warm = 1;
for (i = 0; i < ARRAY_SIZE(tab); i++) {
ret = tda10071_wr_reg_mask(priv, tab[i].reg,
@@ -937,7 +931,6 @@ static int tda10071_init(struct dvb_frontend *fe)
goto error;
} else {
/* cold state - try to download firmware */
- priv->warm = 0;
/* request the firmware, this will block and timeout */
ret = request_firmware(&fw, fw_file, priv->i2c->dev.parent);