diff options
Diffstat (limited to 'drivers/media/video/tuner-xc2028.c')
-rw-r--r-- | drivers/media/video/tuner-xc2028.c | 11 |
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; |