aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/video/em28xx/em28xx-cards.c
diff options
context:
space:
mode:
authorMauro Carvalho Chehab <mchehab@infradead.org>2007-11-05 06:42:55 -0500
committerMauro Carvalho Chehab <mchehab@infradead.org>2008-01-25 16:02:01 -0500
commitf8b6030ccca06bf0d45d9b0908caac9b624a9beb (patch)
tree7aac9d39f1370d3bfed22993696bedad3841ccae /drivers/media/video/em28xx/em28xx-cards.c
parentb873e1a3ccf9e04d2de85db0d510ec4b793fe569 (diff)
V4L/DVB (6560): Fix a bug when setting tuner type
Tuner-type were correctly filled only by the hint function. Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Diffstat (limited to 'drivers/media/video/em28xx/em28xx-cards.c')
-rw-r--r--drivers/media/video/em28xx/em28xx-cards.c29
1 files changed, 21 insertions, 8 deletions
diff --git a/drivers/media/video/em28xx/em28xx-cards.c b/drivers/media/video/em28xx/em28xx-cards.c
index e88bf6700e63..b1afc6c2d372 100644
--- a/drivers/media/video/em28xx/em28xx-cards.c
+++ b/drivers/media/video/em28xx/em28xx-cards.c
@@ -564,8 +564,26 @@ static int em28xx_hint_board(struct em28xx *dev)
564 return -1; 564 return -1;
565} 565}
566 566
567
568static void em28xx_set_model(struct em28xx *dev)
569{
570 dev->is_em2800 = em28xx_boards[dev->model].is_em2800;
571 dev->has_tuner = em28xx_boards[dev->model].has_tuner;
572 dev->has_msp34xx = em28xx_boards[dev->model].has_msp34xx;
573 dev->tda9887_conf = em28xx_boards[dev->model].tda9887_conf;
574 dev->decoder = em28xx_boards[dev->model].decoder;
575 dev->video_inputs = em28xx_boards[dev->model].vchannels;
576
577 if (!em28xx_boards[dev->model].has_tuner)
578 dev->tuner_type = UNSET;
579}
580
567void em28xx_card_setup(struct em28xx *dev) 581void em28xx_card_setup(struct em28xx *dev)
568{ 582{
583 em28xx_set_model(dev);
584
585 dev->tuner_type = em28xx_boards[dev->model].tuner_type;
586
569 /* request some modules */ 587 /* request some modules */
570 switch (dev->model) { 588 switch (dev->model) {
571 case EM2820_BOARD_HAUPPAUGE_WINTV_USB_2: 589 case EM2820_BOARD_HAUPPAUGE_WINTV_USB_2:
@@ -593,16 +611,11 @@ void em28xx_card_setup(struct em28xx *dev)
593 break; 611 break;
594 case EM2820_BOARD_UNKNOWN: 612 case EM2820_BOARD_UNKNOWN:
595 case EM2800_BOARD_UNKNOWN: 613 case EM2800_BOARD_UNKNOWN:
596 em28xx_hint_board(dev); 614 if (!em28xx_hint_board(dev))
615 em28xx_set_model(dev);
597 } 616 }
598 617
599 dev->is_em2800 = em28xx_boards[dev->model].is_em2800; 618 /* Allow override tuner type by a module parameter */
600 dev->has_tuner = em28xx_boards[dev->model].has_tuner;
601 dev->has_msp34xx = em28xx_boards[dev->model].has_msp34xx;
602 dev->tda9887_conf = em28xx_boards[dev->model].tda9887_conf;
603 dev->decoder = em28xx_boards[dev->model].decoder;
604 dev->video_inputs = em28xx_boards[dev->model].vchannels;
605
606 if (tuner >= 0) 619 if (tuner >= 0)
607 dev->tuner_type = tuner; 620 dev->tuner_type = tuner;
608 621