summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDevin Heitmueller <dheitmueller@hauppauge.com>2010-07-08 20:05:30 (GMT)
committerMauro Carvalho Chehab <mchehab@redhat.com>2010-10-21 03:17:19 (GMT)
commite3e0aaaafae24658f3d8683c65bc6793adbdfeb8 (patch)
tree695771abc72977f1755f122f5ce9971cbdd9a26b
parent99d35a0e4c5f90fedd08b378be880308e3ef8cb3 (diff)
downloadlinux-e3e0aaaafae24658f3d8683c65bc6793adbdfeb8.tar.xz
[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>
-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 e8d5f70..4e63c19 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)
}
- switch (dev->model) {
- case CX231XX_BOARD_CNXT_CARRAERA:
- case CX231XX_BOARD_CNXT_RDE_250:
- case CX231XX_BOARD_CNXT_SHELBY:
- case CX231XX_BOARD_CNXT_RDU_250:
- if (dev->board.tuner_type != TUNER_ABSENT) {
- dev->sd_tuner = v4l2_i2c_new_subdev(&dev->v4l2_dev,
- &dev->i2c_bus[1].i2c_adap,
- "tuner", "tuner", 0xc2 >> 1, NULL);
- if (dev->sd_tuner == NULL)
- cx231xx_info(
- "tuner subdev registration failure\n");
-
- cx231xx_config_tuner(dev);
- }
- break;
- case CX231XX_BOARD_CNXT_RDE_253S:
- case CX231XX_BOARD_CNXT_RDU_253S:
- case CX231XX_BOARD_CNXT_VIDEO_GRABBER:
- case CX231XX_BOARD_HAUPPAUGE_EXETER:
- if (dev->board.tuner_type != TUNER_ABSENT) {
- dev->sd_tuner = v4l2_i2c_new_subdev(&dev->v4l2_dev,
- &dev->i2c_bus[1].i2c_adap,
- "tuner", "tuner", 0xc0 >> 1, NULL);
- if (dev->sd_tuner == NULL)
- cx231xx_info(
- "tuner subdev registration failure\n");
-
+ /* Initialize the tuner */
+ if (dev->board.tuner_type != TUNER_ABSENT) {
+ dev->sd_tuner = v4l2_i2c_new_subdev(&dev->v4l2_dev,
+ &dev->i2c_bus[1].i2c_adap,
+ "tuner", "tuner",
+ dev->tuner_addr, NULL);
+ if (dev->sd_tuner == NULL)
+ cx231xx_info("tuner subdev registration failure\n");
+ else
cx231xx_config_tuner(dev);
- }
- break;
- default:
- break;
}
- cx231xx_config_tuner(dev);
-
#if 0
/* TBD IR will be added later */
cx231xx_ir_init(dev);