aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/video/tuner-xc2028.c
diff options
context:
space:
mode:
authorChris Pascoe <c.pascoe@itee.uq.edu.au>2007-12-02 07:30:55 -0500
committerMauro Carvalho Chehab <mchehab@infradead.org>2008-01-25 16:04:15 -0500
commitef207feddf826f099562b239543c447e68991b84 (patch)
tree05f8bd7467d85d57b6475ac8401fae53f7dd0c53 /drivers/media/video/tuner-xc2028.c
parent0e614cd1a5a09b36a3b6d0fff8a08a97800d3cce (diff)
V4L/DVB (6897): xc2028: ignore HAS_IF during specific S-Code type searches
If we are selecting the S-Code firmware to load by name, then we must mask off the HAS_IF bit during the search. Signed-off-by: Chris Pascoe <c.pascoe@itee.uq.edu.au> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Diffstat (limited to 'drivers/media/video/tuner-xc2028.c')
-rw-r--r--drivers/media/video/tuner-xc2028.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/drivers/media/video/tuner-xc2028.c b/drivers/media/video/tuner-xc2028.c
index ddd94f1d6a6f..1817bf67dad1 100644
--- a/drivers/media/video/tuner-xc2028.c
+++ b/drivers/media/video/tuner-xc2028.c
@@ -395,6 +395,7 @@ static int seek_firmware(struct dvb_frontend *fe, unsigned int type,
395{ 395{
396 struct xc2028_data *priv = fe->tuner_priv; 396 struct xc2028_data *priv = fe->tuner_priv;
397 int i, best_i = -1, best_nr_matches = 0; 397 int i, best_i = -1, best_nr_matches = 0;
398 unsigned int ign_firm_type_mask = 0;
398 399
399 tuner_dbg("%s called, want type=", __FUNCTION__); 400 tuner_dbg("%s called, want type=", __FUNCTION__);
400 if (debug) { 401 if (debug) {
@@ -412,16 +413,18 @@ static int seek_firmware(struct dvb_frontend *fe, unsigned int type,
412 413
413 if (type & BASE) 414 if (type & BASE)
414 type &= BASE_TYPES; 415 type &= BASE_TYPES;
415 else if (type & SCODE) 416 else if (type & SCODE) {
416 type &= SCODE_TYPES; 417 type &= SCODE_TYPES;
417 else if (type & DTV_TYPES) 418 ign_firm_type_mask = HAS_IF;
419 } else if (type & DTV_TYPES)
418 type &= DTV_TYPES; 420 type &= DTV_TYPES;
419 else if (type & STD_SPECIFIC_TYPES) 421 else if (type & STD_SPECIFIC_TYPES)
420 type &= STD_SPECIFIC_TYPES; 422 type &= STD_SPECIFIC_TYPES;
421 423
422 /* Seek for exact match */ 424 /* Seek for exact match */
423 for (i = 0; i < priv->firm_size; i++) { 425 for (i = 0; i < priv->firm_size; i++) {
424 if ((type == priv->firm[i].type) && (*id == priv->firm[i].id)) 426 if ((type == (priv->firm[i].type & ~ign_firm_type_mask)) &&
427 (*id == priv->firm[i].id))
425 goto found; 428 goto found;
426 } 429 }
427 430
@@ -430,7 +433,7 @@ static int seek_firmware(struct dvb_frontend *fe, unsigned int type,
430 v4l2_std_id match_mask; 433 v4l2_std_id match_mask;
431 int nr_matches; 434 int nr_matches;
432 435
433 if (type != priv->firm[i].type) 436 if (type != (priv->firm[i].type & ~ign_firm_type_mask))
434 continue; 437 continue;
435 438
436 match_mask = *id & priv->firm[i].id; 439 match_mask = *id & priv->firm[i].id;