Skip to content

Commit

Permalink
V4L/DVB (6853): xc2028: check HAS_IF flag against table
Browse files Browse the repository at this point in the history
When searching for the right S-Code table to load, check the HAS_IF flag
against the firmware we are checking instead of against the the "type"
requested.  We already ignore the scode type requested if the caller passed
an int_freq; this makes the search by frequency consistent with that behaviour.

Signed-off-by: Chris Pascoe <c.pascoe@itee.uq.edu.au>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
  • Loading branch information
Chris Pascoe authored and Mauro Carvalho Chehab committed Jan 25, 2008
1 parent ad35ce9 commit 9ca01e7
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions drivers/media/video/tuner-xc2028.c
Original file line number Diff line number Diff line change
Expand Up @@ -592,7 +592,7 @@ static int load_scode(struct dvb_frontend *fe, unsigned int type,
} else {
for (pos = 0; pos < priv->firm_size; pos++) {
if ((priv->firm[pos].int_freq == int_freq) &&
(type & HAS_IF))
(priv->firm[pos].type & HAS_IF))
break;
}
if (pos == priv->firm_size)
Expand All @@ -601,7 +601,7 @@ static int load_scode(struct dvb_frontend *fe, unsigned int type,

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

if (type & HAS_IF) {
if (priv->firm[pos].type & HAS_IF) {
if (priv->firm[pos].size != 12 * 16 || scode >= 16)
return -EINVAL;
p += 12 * scode;
Expand Down

0 comments on commit 9ca01e7

Please sign in to comment.