From: Hartmut Hackmann Date: Mon, 30 Oct 2006 22:56:59 +0000 (-0300) Subject: V4L/DVB (4791): Added autodetected flag to the saa7134_dev structure X-Git-Tag: v2.6.20-rc2~85^2~18^2~102 X-Git-Url: http://pilppa.com/gitweb/?a=commitdiff_plain;h=a75ec3f033625fb02ccc855fcd2e322275633fc4;p=linux-2.6-omap-h63xx.git 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 Signed-off-by: Mauro Carvalho Chehab --- diff --git a/drivers/media/video/saa7134/saa7134-core.c b/drivers/media/video/saa7134/saa7134-core.c index 5c9e63dfbea..ed038fff3b4 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, must_configure_manually(); dev->board = SAA7134_BOARD_UNKNOWN; } + dev->autodetected = card[dev->nr] != dev->board; dev->tuner_type = saa7134_boards[dev->board].tuner_type; dev->tda9887_conf = saa7134_boards[dev->board].tda9887_conf; if (UNSET != tuner[dev->nr]) dev->tuner_type = tuner[dev->nr]; - printk(KERN_INFO "%s: subsystem: %04x:%04x, board: %s [card=%d,%s]\n", - dev->name,pci_dev->subsystem_vendor, - pci_dev->subsystem_device,saa7134_boards[dev->board].name, - dev->board, card[dev->nr] == dev->board ? - "insmod option" : "autodetected"); + printk(KERN_INFO "%s: subsystem: %04x:%04x, board: %s [card=%d,%s]\n", + dev->name,pci_dev->subsystem_vendor, + pci_dev->subsystem_device,saa7134_boards[dev->board].name, + dev->board, dev->autodetected ? + "autodetected" : "insmod option"); /* get mmio */ 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 799a7149ff6..40603f39214 100644 --- a/drivers/media/video/saa7134/saa7134.h +++ b/drivers/media/video/saa7134/saa7134.h @@ -448,6 +448,9 @@ struct saa7134_dev { struct v4l2_prio_state prio; #endif + /* insmod option/autodetected */ + int autodetected; + /* various device info */ unsigned int resources; struct video_device *video_dev;