]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
PCI: Don't use dmi_name_in_vendors in quirk
authorJean Delvare <khali@linux-fr.org>
Sun, 15 May 2011 16:13:46 +0000 (18:13 +0200)
committerJesse Barnes <jbarnes@virtuousgeek.org>
Sat, 21 May 2011 19:17:15 +0000 (12:17 -0700)
Don't use the costly dmi_name_in_vendors() when we know the string we
are looking for can only be in the DMI board name field. This is more
robust and, more importantly, much faster.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
drivers/pci/quirks.c

index 4fc1b0daedafae035bf4c402548366b2ae4f97bc..e8a140669f90107aba6b2780de4b90494591aa34 100644 (file)
@@ -2349,8 +2349,11 @@ DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_AMD, PCI_DEVICE_ID_AMD_8132_BRIDGE,
  */
 static void __devinit nvenet_msi_disable(struct pci_dev *dev)
 {
-       if (dmi_name_in_vendors("P5N32-SLI PREMIUM") ||
-           dmi_name_in_vendors("P5N32-E SLI")) {
+       const char *board_name = dmi_get_system_info(DMI_BOARD_NAME);
+
+       if (board_name &&
+           (strstr(board_name, "P5N32-SLI PREMIUM") ||
+            strstr(board_name, "P5N32-E SLI"))) {
                dev_info(&dev->dev,
                         "Disabling msi for MCP55 NIC on P5N32-SLI\n");
                dev->no_msi = 1;