Commit e3e0aaaa authored by Devin Heitmueller's avatar Devin Heitmueller Committed by Mauro Carvalho Chehab

[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: default avatarDevin Heitmueller <dheitmueller@hauppauge.com>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@redhat.com>
parent 99d35a0e
...@@ -584,42 +584,17 @@ void cx231xx_card_setup(struct cx231xx *dev) ...@@ -584,42 +584,17 @@ void cx231xx_card_setup(struct cx231xx *dev)
} }
switch (dev->model) { /* Initialize the tuner */
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) { if (dev->board.tuner_type != TUNER_ABSENT) {
dev->sd_tuner = v4l2_i2c_new_subdev(&dev->v4l2_dev, dev->sd_tuner = v4l2_i2c_new_subdev(&dev->v4l2_dev,
&dev->i2c_bus[1].i2c_adap, &dev->i2c_bus[1].i2c_adap,
"tuner", "tuner", 0xc2 >> 1, NULL); "tuner", "tuner",
dev->tuner_addr, NULL);
if (dev->sd_tuner == NULL) if (dev->sd_tuner == NULL)
cx231xx_info( cx231xx_info("tuner subdev registration failure\n");
"tuner subdev registration failure\n"); else
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");
cx231xx_config_tuner(dev); cx231xx_config_tuner(dev);
} }
break;
default:
break;
}
cx231xx_config_tuner(dev);
#if 0 #if 0
/* TBD IR will be added later */ /* TBD IR will be added later */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment