Skip to content

Commit

Permalink
V4L/DVB (4791): Added autodetected flag to the saa7134_dev structure
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Hartmut Hackmann authored and Mauro Carvalho Chehab committed Dec 10, 2006
1 parent 19be685 commit a75ec3f
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 5 deletions.
11 changes: 6 additions & 5 deletions drivers/media/video/saa7134/saa7134-core.c
Original file line number Diff line number Diff line change
Expand Up @@ -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),
Expand Down
3 changes: 3 additions & 0 deletions drivers/media/video/saa7134/saa7134.h
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit a75ec3f

Please sign in to comment.