summaryrefslogtreecommitdiff
path: root/drivers/media/common/tuners/tuner-xc2028.c
diff options
context:
space:
mode:
authorAlina Friedrichsen <x-alina@gmx.net>2011-01-23 12:27:05 -0300
committerMauro Carvalho Chehab <mchehab@redhat.com>2011-03-21 20:31:58 -0300
commitb8bc77db1e23c6e141734511db873902c66bec8c (patch)
tree9eb444e78e960ca7fe42e25e5fbd00660a87d8cb /drivers/media/common/tuners/tuner-xc2028.c
parent2b97e2201eb76d56c4901d39e8ed276f2de0e2e9 (diff)
downloadlwn-b8bc77db1e23c6e141734511db873902c66bec8c.tar.gz
lwn-b8bc77db1e23c6e141734511db873902c66bec8c.zip
[media] tuner-xc2028: More firmware loading retries
My Hauppauge WinTV HVR-1400 needs sometimes more then only one retry to load the firmware successfully. Signed-off-by: Alina Friedrichsen <x-alina@gmx.net> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media/common/tuners/tuner-xc2028.c')
-rw-r--r--drivers/media/common/tuners/tuner-xc2028.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/media/common/tuners/tuner-xc2028.c b/drivers/media/common/tuners/tuner-xc2028.c
index b6ce528e1889..d95f3b256e30 100644
--- a/drivers/media/common/tuners/tuner-xc2028.c
+++ b/drivers/media/common/tuners/tuner-xc2028.c
@@ -685,7 +685,7 @@ static int check_firmware(struct dvb_frontend *fe, unsigned int type,
{
struct xc2028_data *priv = fe->tuner_priv;
struct firmware_properties new_fw;
- int rc = 0, is_retry = 0;
+ int rc = 0, retry_count = 0;
u16 version, hwmodel;
v4l2_std_id std0;
@@ -855,9 +855,9 @@ read_not_reliable:
fail:
memset(&priv->cur_fw, 0, sizeof(priv->cur_fw));
- if (!is_retry) {
+ if (retry_count < 8) {
msleep(50);
- is_retry = 1;
+ retry_count++;
tuner_dbg("Retrying firmware load\n");
goto retry;
}