summaryrefslogtreecommitdiff
path: root/linux/drivers/media/video/em28xx
diff options
context:
space:
mode:
authorMauro Carvalho Chehab <mchehab@infradead.org>2007-11-05 09:42:55 -0200
committerMauro Carvalho Chehab <mchehab@infradead.org>2007-11-05 09:42:55 -0200
commitc49b02c4e90be99f33b0d6c70900eca3af35fdc2 (patch)
treeb1015f85912f42882fa7f3841daaa4bfe46b6839 /linux/drivers/media/video/em28xx
parent1bdffce920587848c68bbb979ffea43897b6f69d (diff)
downloadmediapointer-dvb-s2-c49b02c4e90be99f33b0d6c70900eca3af35fdc2.tar.gz
mediapointer-dvb-s2-c49b02c4e90be99f33b0d6c70900eca3af35fdc2.tar.bz2
Fix a bug when setting tuner type
From: Mauro Carvalho Chehab <mchehab@infradead.org> Tuner-type were correctly filled only by the hint function. Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Diffstat (limited to 'linux/drivers/media/video/em28xx')
-rw-r--r--linux/drivers/media/video/em28xx/em28xx-cards.c29
1 files changed, 21 insertions, 8 deletions
diff --git a/linux/drivers/media/video/em28xx/em28xx-cards.c b/linux/drivers/media/video/em28xx/em28xx-cards.c
index 624d3c37f..5b50232f4 100644
--- a/linux/drivers/media/video/em28xx/em28xx-cards.c
+++ b/linux/drivers/media/video/em28xx/em28xx-cards.c
@@ -565,8 +565,26 @@ static int em28xx_hint_board(struct em28xx *dev)
return -1;
}
+
+static void em28xx_set_model(struct em28xx *dev)
+{
+ dev->is_em2800 = em28xx_boards[dev->model].is_em2800;
+ dev->has_tuner = em28xx_boards[dev->model].has_tuner;
+ dev->has_msp34xx = em28xx_boards[dev->model].has_msp34xx;
+ dev->tda9887_conf = em28xx_boards[dev->model].tda9887_conf;
+ dev->decoder = em28xx_boards[dev->model].decoder;
+ dev->video_inputs = em28xx_boards[dev->model].vchannels;
+
+ if (!em28xx_boards[dev->model].has_tuner)
+ dev->tuner_type = UNSET;
+}
+
void em28xx_card_setup(struct em28xx *dev)
{
+ em28xx_set_model(dev);
+
+ dev->tuner_type = em28xx_boards[dev->model].tuner_type;
+
/* request some modules */
switch (dev->model) {
case EM2820_BOARD_HAUPPAUGE_WINTV_USB_2:
@@ -594,16 +612,11 @@ void em28xx_card_setup(struct em28xx *dev)
break;
case EM2820_BOARD_UNKNOWN:
case EM2800_BOARD_UNKNOWN:
- em28xx_hint_board(dev);
+ if (!em28xx_hint_board(dev))
+ em28xx_set_model(dev);
}
- dev->is_em2800 = em28xx_boards[dev->model].is_em2800;
- dev->has_tuner = em28xx_boards[dev->model].has_tuner;
- dev->has_msp34xx = em28xx_boards[dev->model].has_msp34xx;
- dev->tda9887_conf = em28xx_boards[dev->model].tda9887_conf;
- dev->decoder = em28xx_boards[dev->model].decoder;
- dev->video_inputs = em28xx_boards[dev->model].vchannels;
-
+ /* Allow override tuner type by a module parameter */
if (tuner >= 0)
dev->tuner_type = tuner;