diff options
author | Mauro Carvalho Chehab <mchehab@redhat.com> | 2011-01-19 13:11:58 -0500 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2011-03-21 19:31:48 -0400 |
commit | 99fb079aad031712283d555aa87251706aa60212 (patch) | |
tree | 4d1d0afdb5ec7d470a69901e3af6fdb92a1c5c74 /drivers/media/video/saa7134 | |
parent | 0cda12556bf3ebe47ee98eb6767a085c204ee35e (diff) |
[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: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media/video/saa7134')
-rw-r--r-- | drivers/media/video/saa7134/saa7134-core.c | 35 |
1 files changed, 23 insertions, 12 deletions
diff --git a/drivers/media/video/saa7134/saa7134-core.c b/drivers/media/video/saa7134/saa7134-core.c index 6abeecff6da..41f836fc93e 100644 --- a/drivers/media/video/saa7134/saa7134-core.c +++ b/drivers/media/video/saa7134/saa7134-core.c | |||
@@ -752,19 +752,28 @@ static int saa7134_hwfini(struct saa7134_dev *dev) | |||
752 | return 0; | 752 | return 0; |
753 | } | 753 | } |
754 | 754 | ||
755 | static void __devinit must_configure_manually(void) | 755 | static void __devinit must_configure_manually(int has_eeprom) |
756 | { | 756 | { |
757 | unsigned int i,p; | 757 | unsigned int i,p; |
758 | 758 | ||
759 | printk(KERN_WARNING | 759 | if (!has_eeprom) |
760 | "saa7134: <rant>\n" | 760 | printk(KERN_WARNING |
761 | "saa7134: Congratulations! Your TV card vendor saved a few\n" | 761 | "saa7134: <rant>\n" |
762 | "saa7134: cents for a eeprom, thus your pci board has no\n" | 762 | "saa7134: Congratulations! Your TV card vendor saved a few\n" |
763 | "saa7134: subsystem ID and I can't identify it automatically\n" | 763 | "saa7134: cents for a eeprom, thus your pci board has no\n" |
764 | "saa7134: </rant>\n" | 764 | "saa7134: subsystem ID and I can't identify it automatically\n" |
765 | "saa7134: I feel better now. Ok, here are the good news:\n" | 765 | "saa7134: </rant>\n" |
766 | "saa7134: You can use the card=<nr> insmod option to specify\n" | 766 | "saa7134: I feel better now. Ok, here are the good news:\n" |
767 | "saa7134: which board do you have. The list:\n"); | 767 | "saa7134: You can use the card=<nr> insmod option to specify\n" |
768 | "saa7134: which board do you have. The list:\n"); | ||
769 | else | ||
770 | printk(KERN_WARNING | ||
771 | "saa7134: Board is currently unknown. You might try to use the card=<nr>\n" | ||
772 | "saa7134: insmod option to specify which board do you have, but this is\n" | ||
773 | "saa7134: somewhat risky, as might damage your card. It is better to ask\n" | ||
774 | "saa7134: for support at linux-media@vger.kernel.org.\n" | ||
775 | "saa7134: The supported cards are:\n"); | ||
776 | |||
768 | for (i = 0; i < saa7134_bcount; i++) { | 777 | for (i = 0; i < saa7134_bcount; i++) { |
769 | printk(KERN_WARNING "saa7134: card=%d -> %-40.40s", | 778 | printk(KERN_WARNING "saa7134: card=%d -> %-40.40s", |
770 | i,saa7134_boards[i].name); | 779 | i,saa7134_boards[i].name); |
@@ -936,8 +945,10 @@ static int __devinit saa7134_initdev(struct pci_dev *pci_dev, | |||
936 | if (card[dev->nr] >= 0 && | 945 | if (card[dev->nr] >= 0 && |
937 | card[dev->nr] < saa7134_bcount) | 946 | card[dev->nr] < saa7134_bcount) |
938 | dev->board = card[dev->nr]; | 947 | dev->board = card[dev->nr]; |
939 | if (SAA7134_BOARD_NOAUTO == dev->board) { | 948 | if (SAA7134_BOARD_UNKNOWN == dev->board) |
940 | must_configure_manually(); | 949 | must_configure_manually(0); |
950 | else if (SAA7134_BOARD_NOAUTO == dev->board) { | ||
951 | must_configure_manually(1); | ||
941 | dev->board = SAA7134_BOARD_UNKNOWN; | 952 | dev->board = SAA7134_BOARD_UNKNOWN; |
942 | } | 953 | } |
943 | dev->autodetected = card[dev->nr] != dev->board; | 954 | dev->autodetected = card[dev->nr] != dev->board; |