Commit 99fb079a authored by Mauro Carvalho Chehab's avatar Mauro Carvalho Chehab

[media] saa7134: Properly report when a board doesn't have eeprom

When a device is not detected, the driver prints a warning message.
That's ok, except for the fact that, even on newer devices that have
eeprom but aren't yet supported, it prints a message saying that the
device doesn't have eeprom.

Fix it by having a separate message for devices with eeprom, but not
yet known by the driver.
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@redhat.com>
parent 0cda1255
...@@ -752,10 +752,11 @@ static int saa7134_hwfini(struct saa7134_dev *dev) ...@@ -752,10 +752,11 @@ static int saa7134_hwfini(struct saa7134_dev *dev)
return 0; return 0;
} }
static void __devinit must_configure_manually(void) static void __devinit must_configure_manually(int has_eeprom)
{ {
unsigned int i,p; unsigned int i,p;
if (!has_eeprom)
printk(KERN_WARNING printk(KERN_WARNING
"saa7134: <rant>\n" "saa7134: <rant>\n"
"saa7134: Congratulations! Your TV card vendor saved a few\n" "saa7134: Congratulations! Your TV card vendor saved a few\n"
...@@ -765,6 +766,14 @@ static void __devinit must_configure_manually(void) ...@@ -765,6 +766,14 @@ static void __devinit must_configure_manually(void)
"saa7134: I feel better now. Ok, here are the good news:\n" "saa7134: I feel better now. Ok, here are the good news:\n"
"saa7134: You can use the card=<nr> insmod option to specify\n" "saa7134: You can use the card=<nr> insmod option to specify\n"
"saa7134: which board do you have. The list:\n"); "saa7134: which board do you have. The list:\n");
else
printk(KERN_WARNING
"saa7134: Board is currently unknown. You might try to use the card=<nr>\n"
"saa7134: insmod option to specify which board do you have, but this is\n"
"saa7134: somewhat risky, as might damage your card. It is better to ask\n"
"saa7134: for support at linux-media@vger.kernel.org.\n"
"saa7134: The supported cards are:\n");
for (i = 0; i < saa7134_bcount; i++) { for (i = 0; i < saa7134_bcount; i++) {
printk(KERN_WARNING "saa7134: card=%d -> %-40.40s", printk(KERN_WARNING "saa7134: card=%d -> %-40.40s",
i,saa7134_boards[i].name); i,saa7134_boards[i].name);
...@@ -936,8 +945,10 @@ static int __devinit saa7134_initdev(struct pci_dev *pci_dev, ...@@ -936,8 +945,10 @@ static int __devinit saa7134_initdev(struct pci_dev *pci_dev,
if (card[dev->nr] >= 0 && if (card[dev->nr] >= 0 &&
card[dev->nr] < saa7134_bcount) card[dev->nr] < saa7134_bcount)
dev->board = card[dev->nr]; dev->board = card[dev->nr];
if (SAA7134_BOARD_NOAUTO == dev->board) { if (SAA7134_BOARD_UNKNOWN == dev->board)
must_configure_manually(); must_configure_manually(0);
else if (SAA7134_BOARD_NOAUTO == dev->board) {
must_configure_manually(1);
dev->board = SAA7134_BOARD_UNKNOWN; dev->board = SAA7134_BOARD_UNKNOWN;
} }
dev->autodetected = card[dev->nr] != dev->board; dev->autodetected = card[dev->nr] != dev->board;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment