aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHartmut Hackmann <hartmut.hackmann@t-online.de>2006-10-30 17:56:59 -0500
committerMauro Carvalho Chehab <mchehab@infradead.org>2006-12-10 05:51:10 -0500
commita75ec3f033625fb02ccc855fcd2e322275633fc4 (patch)
tree487ca55f0b1dc959fb3eba57fd96d1270463ac2f
parent19be685a4a5475ecdbbbb579458eeda890d27a96 (diff)
V4L/DVB (4791): Added autodetected flag to the saa7134_dev structure
In case the exact board type needs to be determined by probing or evaluating the eeprom, this flag allows to still set the board type via the card=xx insmod option. This is an extract of a patch by Francis Barber. Signed-off-by: Hartmut Hackmann <hartmut.hackmann@t-online.de> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
-rw-r--r--drivers/media/video/saa7134/saa7134-core.c11
-rw-r--r--drivers/media/video/saa7134/saa7134.h3
2 files changed, 9 insertions, 5 deletions
diff --git a/drivers/media/video/saa7134/saa7134-core.c b/drivers/media/video/saa7134/saa7134-core.c
index 5c9e63dfbea6..ed038fff3b4f 100644
--- a/drivers/media/video/saa7134/saa7134-core.c
+++ b/drivers/media/video/saa7134/saa7134-core.c
@@ -889,15 +889,16 @@ static int __devinit saa7134_initdev(struct pci_dev *pci_dev,
889 must_configure_manually(); 889 must_configure_manually();
890 dev->board = SAA7134_BOARD_UNKNOWN; 890 dev->board = SAA7134_BOARD_UNKNOWN;
891 } 891 }
892 dev->autodetected = card[dev->nr] != dev->board;
892 dev->tuner_type = saa7134_boards[dev->board].tuner_type; 893 dev->tuner_type = saa7134_boards[dev->board].tuner_type;
893 dev->tda9887_conf = saa7134_boards[dev->board].tda9887_conf; 894 dev->tda9887_conf = saa7134_boards[dev->board].tda9887_conf;
894 if (UNSET != tuner[dev->nr]) 895 if (UNSET != tuner[dev->nr])
895 dev->tuner_type = tuner[dev->nr]; 896 dev->tuner_type = tuner[dev->nr];
896 printk(KERN_INFO "%s: subsystem: %04x:%04x, board: %s [card=%d,%s]\n", 897 printk(KERN_INFO "%s: subsystem: %04x:%04x, board: %s [card=%d,%s]\n",
897 dev->name,pci_dev->subsystem_vendor, 898 dev->name,pci_dev->subsystem_vendor,
898 pci_dev->subsystem_device,saa7134_boards[dev->board].name, 899 pci_dev->subsystem_device,saa7134_boards[dev->board].name,
899 dev->board, card[dev->nr] == dev->board ? 900 dev->board, dev->autodetected ?
900 "insmod option" : "autodetected"); 901 "autodetected" : "insmod option");
901 902
902 /* get mmio */ 903 /* get mmio */
903 if (!request_mem_region(pci_resource_start(pci_dev,0), 904 if (!request_mem_region(pci_resource_start(pci_dev,0),
diff --git a/drivers/media/video/saa7134/saa7134.h b/drivers/media/video/saa7134/saa7134.h
index 799a7149ff66..40603f392145 100644
--- a/drivers/media/video/saa7134/saa7134.h
+++ b/drivers/media/video/saa7134/saa7134.h
@@ -448,6 +448,9 @@ struct saa7134_dev {
448 struct v4l2_prio_state prio; 448 struct v4l2_prio_state prio;
449#endif 449#endif
450 450
451 /* insmod option/autodetected */
452 int autodetected;
453
451 /* various device info */ 454 /* various device info */
452 unsigned int resources; 455 unsigned int resources;
453 struct video_device *video_dev; 456 struct video_device *video_dev;