aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorDevin Heitmueller <dheitmueller@hauppauge.com>2010-07-08 16:05:30 -0400
committerMauro Carvalho Chehab <mchehab@redhat.com>2010-10-20 23:17:19 -0400
commite3e0aaaafae24658f3d8683c65bc6793adbdfeb8 (patch)
tree695771abc72977f1755f122f5ce9971cbdd9a26b /drivers
parent99d35a0e4c5f90fedd08b378be880308e3ef8cb3 (diff)
[media] cx231xx: remove board specific initialization
There is no need for a switch statement here. Use the contents of the board profile to dictate the tuner driver and i2c address. Eventually if a board ever comes around which has a different i2c bus than #1, well that should be a field in the board profile as well. Signed-off-by: Devin Heitmueller <dheitmueller@hauppauge.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/media/video/cx231xx/cx231xx-cards.c43
1 files changed, 9 insertions, 34 deletions
diff --git a/drivers/media/video/cx231xx/cx231xx-cards.c b/drivers/media/video/cx231xx/cx231xx-cards.c
index e8d5f70a5116..4e63c194df01 100644
--- a/drivers/media/video/cx231xx/cx231xx-cards.c
+++ b/drivers/media/video/cx231xx/cx231xx-cards.c
@@ -584,43 +584,18 @@ void cx231xx_card_setup(struct cx231xx *dev)
584 584
585 } 585 }
586 586
587 switch (dev->model) { 587 /* Initialize the tuner */
588 case CX231XX_BOARD_CNXT_CARRAERA: 588 if (dev->board.tuner_type != TUNER_ABSENT) {
589 case CX231XX_BOARD_CNXT_RDE_250: 589 dev->sd_tuner = v4l2_i2c_new_subdev(&dev->v4l2_dev,
590 case CX231XX_BOARD_CNXT_SHELBY: 590 &dev->i2c_bus[1].i2c_adap,
591 case CX231XX_BOARD_CNXT_RDU_250: 591 "tuner", "tuner",
592 if (dev->board.tuner_type != TUNER_ABSENT) { 592 dev->tuner_addr, NULL);
593 dev->sd_tuner = v4l2_i2c_new_subdev(&dev->v4l2_dev, 593 if (dev->sd_tuner == NULL)
594 &dev->i2c_bus[1].i2c_adap, 594 cx231xx_info("tuner subdev registration failure\n");
595 "tuner", "tuner", 0xc2 >> 1, NULL); 595 else
596 if (dev->sd_tuner == NULL)
597 cx231xx_info(
598 "tuner subdev registration failure\n");
599
600 cx231xx_config_tuner(dev);
601 }
602 break;
603 case CX231XX_BOARD_CNXT_RDE_253S:
604 case CX231XX_BOARD_CNXT_RDU_253S:
605 case CX231XX_BOARD_CNXT_VIDEO_GRABBER:
606 case CX231XX_BOARD_HAUPPAUGE_EXETER:
607 if (dev->board.tuner_type != TUNER_ABSENT) {
608 dev->sd_tuner = v4l2_i2c_new_subdev(&dev->v4l2_dev,
609 &dev->i2c_bus[1].i2c_adap,
610 "tuner", "tuner", 0xc0 >> 1, NULL);
611 if (dev->sd_tuner == NULL)
612 cx231xx_info(
613 "tuner subdev registration failure\n");
614
615 cx231xx_config_tuner(dev); 596 cx231xx_config_tuner(dev);
616 }
617 break;
618 default:
619 break;
620 } 597 }
621 598
622 cx231xx_config_tuner(dev);
623
624#if 0 599#if 0
625 /* TBD IR will be added later */ 600 /* TBD IR will be added later */
626 cx231xx_ir_init(dev); 601 cx231xx_ir_init(dev);