aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorMauro Carvalho Chehab <mchehab@redhat.com>2011-02-15 06:30:50 -0500
committerMauro Carvalho Chehab <mchehab@redhat.com>2011-03-21 19:32:03 -0400
commitad020dc2fe9039628cf6cef42cd1b76531ee8411 (patch)
tree88f203e4cd667d4c6e9e7d8a6e5954cb4bd54cfa /drivers
parent2d351df443b0b324a440b5fd053074562d36a7f5 (diff)
[media] tuner-core: remove usage of DIGITAL_TV
tuner-core has no business to do with digital TV. So, don't use T_DIGITAL_TV on it, as it has no code to distinguish between them, and nobody fills T_DIGITAL_TV right. Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/media/video/au0828/au0828-cards.c3
-rw-r--r--drivers/media/video/bt8xx/bttv-cards.c2
-rw-r--r--drivers/media/video/cx88/cx88-cards.c4
-rw-r--r--drivers/media/video/saa7134/saa7134-cards.c4
-rw-r--r--drivers/media/video/tuner-core.c18
5 files changed, 11 insertions, 20 deletions
diff --git a/drivers/media/video/au0828/au0828-cards.c b/drivers/media/video/au0828/au0828-cards.c
index 01be89fa5c78..39fc923fc46b 100644
--- a/drivers/media/video/au0828/au0828-cards.c
+++ b/drivers/media/video/au0828/au0828-cards.c
@@ -185,8 +185,7 @@ void au0828_card_setup(struct au0828_dev *dev)
185 static u8 eeprom[256]; 185 static u8 eeprom[256];
186 struct tuner_setup tun_setup; 186 struct tuner_setup tun_setup;
187 struct v4l2_subdev *sd; 187 struct v4l2_subdev *sd;
188 unsigned int mode_mask = T_ANALOG_TV | 188 unsigned int mode_mask = T_ANALOG_TV;
189 T_DIGITAL_TV;
190 189
191 dprintk(1, "%s()\n", __func__); 190 dprintk(1, "%s()\n", __func__);
192 191
diff --git a/drivers/media/video/bt8xx/bttv-cards.c b/drivers/media/video/bt8xx/bttv-cards.c
index 7f58756d72c8..242f0d512238 100644
--- a/drivers/media/video/bt8xx/bttv-cards.c
+++ b/drivers/media/video/bt8xx/bttv-cards.c
@@ -3616,7 +3616,7 @@ void __devinit bttv_init_tuner(struct bttv *btv)
3616 &btv->c.i2c_adap, "tuner", 3616 &btv->c.i2c_adap, "tuner",
3617 0, v4l2_i2c_tuner_addrs(ADDRS_TV_WITH_DEMOD)); 3617 0, v4l2_i2c_tuner_addrs(ADDRS_TV_WITH_DEMOD));
3618 3618
3619 tun_setup.mode_mask = T_ANALOG_TV | T_DIGITAL_TV; 3619 tun_setup.mode_mask = T_ANALOG_TV;
3620 tun_setup.type = btv->tuner_type; 3620 tun_setup.type = btv->tuner_type;
3621 tun_setup.addr = addr; 3621 tun_setup.addr = addr;
3622 3622
diff --git a/drivers/media/video/cx88/cx88-cards.c b/drivers/media/video/cx88/cx88-cards.c
index 4e6ee5584cb3..8128b936c686 100644
--- a/drivers/media/video/cx88/cx88-cards.c
+++ b/drivers/media/video/cx88/cx88-cards.c
@@ -3165,9 +3165,7 @@ static void cx88_card_setup(struct cx88_core *core)
3165{ 3165{
3166 static u8 eeprom[256]; 3166 static u8 eeprom[256];
3167 struct tuner_setup tun_setup; 3167 struct tuner_setup tun_setup;
3168 unsigned int mode_mask = T_RADIO | 3168 unsigned int mode_mask = T_RADIO | T_ANALOG_TV;
3169 T_ANALOG_TV |
3170 T_DIGITAL_TV;
3171 3169
3172 memset(&tun_setup, 0, sizeof(tun_setup)); 3170 memset(&tun_setup, 0, sizeof(tun_setup));
3173 3171
diff --git a/drivers/media/video/saa7134/saa7134-cards.c b/drivers/media/video/saa7134/saa7134-cards.c
index 74467c18e69a..61c6007c8ea6 100644
--- a/drivers/media/video/saa7134/saa7134-cards.c
+++ b/drivers/media/video/saa7134/saa7134-cards.c
@@ -7333,9 +7333,7 @@ int saa7134_board_init1(struct saa7134_dev *dev)
7333static void saa7134_tuner_setup(struct saa7134_dev *dev) 7333static void saa7134_tuner_setup(struct saa7134_dev *dev)
7334{ 7334{
7335 struct tuner_setup tun_setup; 7335 struct tuner_setup tun_setup;
7336 unsigned int mode_mask = T_RADIO | 7336 unsigned int mode_mask = T_RADIO | T_ANALOG_TV;
7337 T_ANALOG_TV |
7338 T_DIGITAL_TV;
7339 7337
7340 memset(&tun_setup, 0, sizeof(tun_setup)); 7338 memset(&tun_setup, 0, sizeof(tun_setup));
7341 tun_setup.tuner_callback = saa7134_tuner_callback; 7339 tun_setup.tuner_callback = saa7134_tuner_callback;
diff --git a/drivers/media/video/tuner-core.c b/drivers/media/video/tuner-core.c
index dcf03face265..5e1437c358f8 100644
--- a/drivers/media/video/tuner-core.c
+++ b/drivers/media/video/tuner-core.c
@@ -497,7 +497,7 @@ static void tuner_lookup(struct i2c_adapter *adap,
497 device. If other devices appear then we need to 497 device. If other devices appear then we need to
498 make this test more general. */ 498 make this test more general. */
499 else if (*tv == NULL && pos->type != TUNER_TDA9887 && 499 else if (*tv == NULL && pos->type != TUNER_TDA9887 &&
500 (pos->mode_mask & (T_ANALOG_TV | T_DIGITAL_TV))) 500 (pos->mode_mask & T_ANALOG_TV))
501 *tv = pos; 501 *tv = pos;
502 } 502 }
503} 503}
@@ -565,8 +565,7 @@ static int tuner_probe(struct i2c_client *client,
565 } else { 565 } else {
566 /* Default is being tda9887 */ 566 /* Default is being tda9887 */
567 t->type = TUNER_TDA9887; 567 t->type = TUNER_TDA9887;
568 t->mode_mask = T_RADIO | T_ANALOG_TV | 568 t->mode_mask = T_RADIO | T_ANALOG_TV;
569 T_DIGITAL_TV;
570 goto register_client; 569 goto register_client;
571 } 570 }
572 break; 571 break;
@@ -596,7 +595,7 @@ static int tuner_probe(struct i2c_client *client,
596 first found TV tuner. */ 595 first found TV tuner. */
597 tuner_lookup(t->i2c->adapter, &radio, &tv); 596 tuner_lookup(t->i2c->adapter, &radio, &tv);
598 if (tv == NULL) { 597 if (tv == NULL) {
599 t->mode_mask = T_ANALOG_TV | T_DIGITAL_TV; 598 t->mode_mask = T_ANALOG_TV;
600 if (radio == NULL) 599 if (radio == NULL)
601 t->mode_mask |= T_RADIO; 600 t->mode_mask |= T_RADIO;
602 tuner_dbg("Setting mode_mask to 0x%02x\n", t->mode_mask); 601 tuner_dbg("Setting mode_mask to 0x%02x\n", t->mode_mask);
@@ -607,18 +606,15 @@ register_client:
607 /* Sets a default mode */ 606 /* Sets a default mode */
608 if (t->mode_mask & T_ANALOG_TV) 607 if (t->mode_mask & T_ANALOG_TV)
609 t->mode = V4L2_TUNER_ANALOG_TV; 608 t->mode = V4L2_TUNER_ANALOG_TV;
610 else if (t->mode_mask & T_RADIO)
611 t->mode = V4L2_TUNER_RADIO;
612 else 609 else
613 t->mode = V4L2_TUNER_DIGITAL_TV; 610 t->mode = V4L2_TUNER_RADIO;
614 set_type(client, t->type, t->mode_mask, t->config, t->fe.callback); 611 set_type(client, t->type, t->mode_mask, t->config, t->fe.callback);
615 list_add_tail(&t->list, &tuner_list); 612 list_add_tail(&t->list, &tuner_list);
616 613
617 tuner_info("Tuner %d found with type(s)%s%s%s.\n", 614 tuner_info("Tuner %d found with type(s)%s%s.\n",
618 t->type, 615 t->type,
619 t->mode_mask & T_RADIO ? " radio" : "", 616 t->mode_mask & T_RADIO ? " Radio" : "",
620 t->mode_mask & T_ANALOG_TV ? " TV" : "", 617 t->mode_mask & T_ANALOG_TV ? " TV" : "");
621 t->mode_mask & T_ANALOG_TV ? " DTV" : "");
622 return 0; 618 return 0;
623} 619}
624 620