diff options
-rw-r--r-- | drivers/media/video/em28xx/em28xx-cards.c | 29 |
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 | |||
568 | static 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 | |||
567 | void em28xx_card_setup(struct em28xx *dev) | 581 | void 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 | ||