summaryrefslogtreecommitdiff
path: root/linux/drivers/media
diff options
context:
space:
mode:
authorChris Pascoe <c.pascoe@itee.uq.edu.au>2007-12-02 22:30:55 +1000
committerChris Pascoe <c.pascoe@itee.uq.edu.au>2007-12-02 22:30:55 +1000
commit412d85c121032ec0156a4b665cfd0cf8e663277e (patch)
tree101081cfe600258487e97d6b1a8666c440d89279 /linux/drivers/media
parent9542e383f613070c986fbdfee8d8dc582e99f75f (diff)
downloadmediapointer-dvb-s2-412d85c121032ec0156a4b665cfd0cf8e663277e.tar.gz
mediapointer-dvb-s2-412d85c121032ec0156a4b665cfd0cf8e663277e.tar.bz2
xc2028: ignore HAS_IF during specific S-Code type searches
From: Chris Pascoe <c.pascoe@itee.uq.edu.au> 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>
Diffstat (limited to 'linux/drivers/media')
-rw-r--r--linux/drivers/media/video/tuner-xc2028.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/linux/drivers/media/video/tuner-xc2028.c b/linux/drivers/media/video/tuner-xc2028.c
index 14880533c..cf54d24bb 100644
--- a/linux/drivers/media/video/tuner-xc2028.c
+++ b/linux/drivers/media/video/tuner-xc2028.c
@@ -410,6 +410,7 @@ static int seek_firmware(struct dvb_frontend *fe, unsigned int type,
{
struct xc2028_data *priv = fe->tuner_priv;
int i, best_i = -1, best_nr_matches = 0;
+ unsigned int ign_firm_type_mask = 0;
tuner_dbg("%s called, want type=", __FUNCTION__);
if (debug) {
@@ -427,16 +428,18 @@ static int seek_firmware(struct dvb_frontend *fe, unsigned int type,
if (type & BASE)
type &= BASE_TYPES;
- else if (type & SCODE)
+ else if (type & SCODE) {
type &= SCODE_TYPES;
- else if (type & DTV_TYPES)
+ ign_firm_type_mask = HAS_IF;
+ } else if (type & DTV_TYPES)
type &= DTV_TYPES;
else if (type & STD_SPECIFIC_TYPES)
type &= STD_SPECIFIC_TYPES;
/* Seek for exact match */
for (i = 0; i < priv->firm_size; i++) {
- if ((type == priv->firm[i].type) && (*id == priv->firm[i].id))
+ if ((type == (priv->firm[i].type & ~ign_firm_type_mask)) &&
+ (*id == priv->firm[i].id))
goto found;
}
@@ -445,7 +448,7 @@ static int seek_firmware(struct dvb_frontend *fe, unsigned int type,
v4l2_std_id match_mask;
int nr_matches;
- if (type != priv->firm[i].type)
+ if (type != (priv->firm[i].type & ~ign_firm_type_mask))
continue;
match_mask = *id & priv->firm[i].id;