]> pilppa.com Git - linux-2.6-omap-h63xx.git/commitdiff
V4L/DVB (4791): Added autodetected flag to the saa7134_dev structure
authorHartmut Hackmann <hartmut.hackmann@t-online.de>
Mon, 30 Oct 2006 22:56:59 +0000 (19:56 -0300)
committerMauro Carvalho Chehab <mchehab@infradead.org>
Sun, 10 Dec 2006 10:51:10 +0000 (08:51 -0200)
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>
drivers/media/video/saa7134/saa7134-core.c
drivers/media/video/saa7134/saa7134.h

index 5c9e63dfbea6ef3227385e5e1652a0e8caf99e15..ed038fff3b4f80b16feb21021c9508ab83b759b1 100644 (file)
@@ -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),
index 799a7149ff669e00cc98cf767fe960718c6a88cb..40603f392145a763b997dae5599db87e120daddb 100644 (file)
@@ -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;