Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 76453
b: refs/heads/master
c: d7b22c5
h: refs/heads/master
i:
  76451: 2a52d65
v: v3
  • Loading branch information
Chris Pascoe authored and Mauro Carvalho Chehab committed Jan 25, 2008
1 parent cedae09 commit d3a16fc
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 3 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: b1535293dc816f01b0934718c370f9533c7d635e
refs/heads/master: d7b22c5cfef28d21051331622f9595993a083cc4
12 changes: 10 additions & 2 deletions trunk/drivers/media/video/tuner-xc2028.c
Original file line number Diff line number Diff line change
Expand Up @@ -565,17 +565,25 @@ static int load_scode(struct dvb_frontend *fe, unsigned int type,

p = priv->firm[pos].ptr;

if ((priv->firm[pos].size != 12 * 16) || (scode >= 16))
/* 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;

tuner_info("Loading SCODE for type=");
dump_firm_type(priv->firm[pos].type);
printk("(%x), id %016llx.\n", priv->firm[pos].type,
(unsigned long long)*id);

if (priv->firm_version < 0x0202)
rc = send_seq(priv, {0x20, 0x00, 0x00, 0x00});
else
rc = send_seq(priv, {0xa0, 0x00, 0x00, 0x00});
if (rc < 0)
return -EIO;

rc = i2c_send(priv, p + 12 * scode, 12);
rc = i2c_send(priv, p + 14 * scode + 2, 12);
if (rc < 0)
return -EIO;

Expand Down

0 comments on commit d3a16fc

Please sign in to comment.