aboutsummaryrefslogtreecommitdiff
path: root/drivers/media
diff options
context:
space:
mode:
authorIstvan Varga <istvan_v@mailbox.hu>2011-06-04 11:59:54 -0300
committerMauro Carvalho Chehab <mchehab@redhat.com>2011-07-27 17:52:36 -0300
commit595a83f49a7536f43a68cab78098d5ad11d1c51f (patch)
tree9966e5e4b32e93f404f72b713df2cc111f3d4128 /drivers/media
parentffce6266c8be9076947462c688ad3a3099c83eeb (diff)
[media] xc4000: check_firmware() cleanup
This patch makes the following fixes in check_firmware(): - there is only one BASE and INIT1 firmware for XC4000 - loading SCODE is needed also for FM radio Signed-off-by: Istvan Varga <istvan_v@mailbox.hu> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media')
-rw-r--r--drivers/media/common/tuners/xc4000.c15
1 files changed, 5 insertions, 10 deletions
diff --git a/drivers/media/common/tuners/xc4000.c b/drivers/media/common/tuners/xc4000.c
index d83da50ebb7..71739dc3343 100644
--- a/drivers/media/common/tuners/xc4000.c
+++ b/drivers/media/common/tuners/xc4000.c
@@ -903,7 +903,7 @@ static int check_firmware(struct dvb_frontend *fe, unsigned int type,
struct xc4000_priv *priv = fe->tuner_priv;
struct firmware_properties new_fw;
int rc = 0, is_retry = 0;
- u16 version, hwmodel;
+ u16 version = 0, hwmodel;
v4l2_std_id std0;
u8 hw_major, hw_minor, fw_major, fw_minor;
@@ -945,8 +945,7 @@ retry:
}
/* No need to reload base firmware if it matches */
- if (((BASE | new_fw.type) & BASE_TYPES) ==
- (priv->cur_fw.type & BASE_TYPES)) {
+ if (priv->cur_fw.type & BASE) {
dprintk(1, "BASE firmware not changed.\n");
goto skip_base;
}
@@ -961,7 +960,7 @@ retry:
/* BASE firmwares are all std0 */
std0 = 0;
- rc = load_firmware(fe, BASE | new_fw.type, &std0);
+ rc = load_firmware(fe, BASE, &std0);
if (rc < 0) {
printk("Error %d while loading base firmware\n", rc);
goto fail;
@@ -970,10 +969,9 @@ retry:
/* Load INIT1, if needed */
dprintk(1, "Load init1 firmware, if exists\n");
- rc = load_firmware(fe, BASE | INIT1 | new_fw.type, &std0);
+ rc = load_firmware(fe, BASE | INIT1, &std0);
if (rc == -ENOENT)
- rc = load_firmware(fe, (BASE | INIT1 | new_fw.type) & ~F8MHZ,
- &std0);
+ rc = load_firmware(fe, BASE | INIT1, &std0);
if (rc < 0 && rc != -ENOENT) {
tuner_err("Error %d while loading init1 firmware\n",
rc);
@@ -1007,9 +1005,6 @@ skip_std_specific:
goto check_device;
}
- if (new_fw.type & FM)
- goto check_device;
-
/* Load SCODE firmware, if exists */
rc = load_scode(fe, new_fw.type | new_fw.scode_table, &new_fw.id,
new_fw.int_freq, new_fw.scode_nr);