From 0cc708e97aa5aea08d08b4daafb408dd6017e8f7 Mon Sep 17 00:00:00 2001 From: Istvan Varga Date: Sat, 4 Jun 2011 11:56:18 -0300 Subject: [PATCH] --- yaml --- r: 261247 b: refs/heads/master c: ffce6266c8be9076947462c688ad3a3099c83eeb h: refs/heads/master i: 261245: 49a86c78d668cbc5d31fc3da1caa38493f2ec57b 261243: 91e875c73599390d2d8308e9f6d8d82c089ead15 261239: a49b3bf071b12fcff341c260d73337a40d54edbb 261231: 043b5e5f95ee5af81d16bd85a84ca4a5867a4b1f 261215: 2017c600fbca790b35e65da4e5e349d0dcf568a0 261183: 3b28d8505fa4551aafbc148139bd08a9f1843723 261119: c7ba6cefaa46bc36b671a25f4d4316bdd87fa3e2 v: v3 --- [refs] | 2 +- trunk/drivers/media/common/tuners/xc4000.c | 26 +++++++--------------- 2 files changed, 9 insertions(+), 19 deletions(-) diff --git a/[refs] b/[refs] index f96da4464817..1061f57a0a0b 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 3db9570482f368cd2f62c258802da21667ec6198 +refs/heads/master: ffce6266c8be9076947462c688ad3a3099c83eeb diff --git a/trunk/drivers/media/common/tuners/xc4000.c b/trunk/drivers/media/common/tuners/xc4000.c index 811519a49f59..d83da50ebb70 100644 --- a/trunk/drivers/media/common/tuners/xc4000.c +++ b/trunk/drivers/media/common/tuners/xc4000.c @@ -780,8 +780,7 @@ static int xc4000_fwupload(struct dvb_frontend *fe) p += sizeof(size); if (!size || size > endp - p) { - printk("Firmware type "); - printk("(%x), id %llx is corrupted " + printk("Firmware type (%x), id %llx is corrupted " "(size=%d, expected %d)\n", type, (unsigned long long)id, (unsigned)(endp - p), size); @@ -839,10 +838,10 @@ static int load_scode(struct dvb_frontend *fe, unsigned int type, v4l2_std_id *id, __u16 int_freq, int scode) { struct xc4000_priv *priv = fe->tuner_priv; - int pos, rc; - unsigned char *p; - u8 scode_buf[13]; - u8 indirect_mode[5]; + int pos, rc; + unsigned char *p; + u8 scode_buf[13]; + u8 indirect_mode[5]; dprintk(1, "%s called int_freq=%d\n", __func__, int_freq); @@ -862,18 +861,9 @@ static int load_scode(struct dvb_frontend *fe, unsigned int type, p = priv->firm[pos].ptr; - if (priv->firm[pos].type & HAS_IF) { - if (priv->firm[pos].size != 12 * 16 || scode >= 16) - return -EINVAL; - p += 12 * scode; - } else { - /* 16 SCODE entries per file; each SCODE entry is 12 bytes and - * has a 2-byte size header in the firmware format. */ - if (priv->firm[pos].size != 14 * 16 || scode >= 16 || - le16_to_cpu(*(__u16 *)(p + 14 * scode)) != 12) - return -EINVAL; - p += 14 * scode + 2; - } + if (priv->firm[pos].size != 12 * 16 || scode >= 16) + return -EINVAL; + p += 12 * scode; tuner_info("Loading SCODE for type="); dump_firm_type_and_int_freq(priv->firm[pos].type,