aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSimon Arlott <simon@fire.lp0.eu>2008-07-26 10:30:03 -0400
committerMauro Carvalho Chehab <mchehab@infradead.org>2008-07-26 12:18:23 -0400
commitd53687d1d22c3204394658a31654de2f1efb0e8f (patch)
tree6dd8b91da448ed13755bc146354bee5b4b938dbf
parent53faa1b1b9a262a634d7761ab5c62bbb017666bd (diff)
V4L/DVB (8496): saa7134: Copy tuner data earlier in init to avoid overwriting manual tuner type
When saa7134_board_init2 runs, it immediately overwrites the current value (set earlier from module parameter) of tuner_type with the static values, and then does autodetection. This patch moves the tuner_addr copy to earlier in saa7134_initdev and removes the tuner_type copy from saa7134_board_init2. Autodetection could still potentially change to the wrong tuner type, but it is now possible to override the default type for the card again. My card's tuner is configured with autodetection from eeprom, so I don't need to manually set the tuner. I've checked that the autodetection still works for my card. Signed-off-by: Simon Arlott <simon@fire.lp0.eu> Reviewed-by: Hermann Pitton <hermann-pitton@arcor.de> Cc: Brian Marete <bgmarete@gmail.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
-rw-r--r--drivers/media/video/saa7134/saa7134-cards.c3
-rw-r--r--drivers/media/video/saa7134/saa7134-core.c5
2 files changed, 3 insertions, 5 deletions
diff --git a/drivers/media/video/saa7134/saa7134-cards.c b/drivers/media/video/saa7134/saa7134-cards.c
index 6893f998d292..98364d171def 100644
--- a/drivers/media/video/saa7134/saa7134-cards.c
+++ b/drivers/media/video/saa7134/saa7134-cards.c
@@ -5853,9 +5853,6 @@ int saa7134_board_init2(struct saa7134_dev *dev)
5853 unsigned char buf; 5853 unsigned char buf;
5854 int board; 5854 int board;
5855 5855
5856 dev->tuner_type = saa7134_boards[dev->board].tuner_type;
5857 dev->tuner_addr = saa7134_boards[dev->board].tuner_addr;
5858
5859 switch (dev->board) { 5856 switch (dev->board) {
5860 case SAA7134_BOARD_BMK_MPEX_NOTUNER: 5857 case SAA7134_BOARD_BMK_MPEX_NOTUNER:
5861 case SAA7134_BOARD_BMK_MPEX_TUNER: 5858 case SAA7134_BOARD_BMK_MPEX_TUNER:
diff --git a/drivers/media/video/saa7134/saa7134-core.c b/drivers/media/video/saa7134/saa7134-core.c
index f3e7a598e4b5..a404368308aa 100644
--- a/drivers/media/video/saa7134/saa7134-core.c
+++ b/drivers/media/video/saa7134/saa7134-core.c
@@ -945,11 +945,12 @@ static int __devinit saa7134_initdev(struct pci_dev *pci_dev,
945 dev->board = SAA7134_BOARD_UNKNOWN; 945 dev->board = SAA7134_BOARD_UNKNOWN;
946 } 946 }
947 dev->autodetected = card[dev->nr] != dev->board; 947 dev->autodetected = card[dev->nr] != dev->board;
948 dev->tuner_type = saa7134_boards[dev->board].tuner_type; 948 dev->tuner_type = saa7134_boards[dev->board].tuner_type;
949 dev->tuner_addr = saa7134_boards[dev->board].tuner_addr;
949 dev->tda9887_conf = saa7134_boards[dev->board].tda9887_conf; 950 dev->tda9887_conf = saa7134_boards[dev->board].tda9887_conf;
950 if (UNSET != tuner[dev->nr]) 951 if (UNSET != tuner[dev->nr])
951 dev->tuner_type = tuner[dev->nr]; 952 dev->tuner_type = tuner[dev->nr];
952 printk(KERN_INFO "%s: subsystem: %04x:%04x, board: %s [card=%d,%s]\n", 953 printk(KERN_INFO "%s: subsystem: %04x:%04x, board: %s [card=%d,%s]\n",
953 dev->name,pci_dev->subsystem_vendor, 954 dev->name,pci_dev->subsystem_vendor,
954 pci_dev->subsystem_device,saa7134_boards[dev->board].name, 955 pci_dev->subsystem_device,saa7134_boards[dev->board].name,
955 dev->board, dev->autodetected ? 956 dev->board, dev->autodetected ?