aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/hwmon/abituguru3.c
diff options
context:
space:
mode:
authorIngo Molnar <mingo@elte.hu>2009-03-11 05:49:34 -0400
committerIngo Molnar <mingo@elte.hu>2009-03-11 05:49:34 -0400
commitd95c3578120e5bc4784069439f00ccb1b5f87717 (patch)
treec819de31de3983f3d69f223ede07667ff23bf7da /drivers/hwmon/abituguru3.c
parentba1d755a36f66101aa88ac9ebb54694def6ec38d (diff)
parent78b020d035074fc3aa4d017353bb2c32e2aff56f (diff)
Merge branch 'x86/core' into cpus4096
Diffstat (limited to 'drivers/hwmon/abituguru3.c')
-rw-r--r--drivers/hwmon/abituguru3.c24
1 files changed, 18 insertions, 6 deletions
diff --git a/drivers/hwmon/abituguru3.c b/drivers/hwmon/abituguru3.c
index 70bb854086df..e52b38806d03 100644
--- a/drivers/hwmon/abituguru3.c
+++ b/drivers/hwmon/abituguru3.c
@@ -279,7 +279,7 @@ static const struct abituguru3_motherboard_info abituguru3_motherboards[] = {
279 { "OTES1 Fan", 36, 2, 60, 1, 0 }, 279 { "OTES1 Fan", 36, 2, 60, 1, 0 },
280 { NULL, 0, 0, 0, 0, 0 } } 280 { NULL, 0, 0, 0, 0, 0 } }
281 }, 281 },
282 { 0x0011, "AT8 32X(ATI RD580-ULI M1575)", { 282 { 0x0011, "AT8 32X", {
283 { "CPU Core", 0, 0, 10, 1, 0 }, 283 { "CPU Core", 0, 0, 10, 1, 0 },
284 { "DDR", 1, 0, 20, 1, 0 }, 284 { "DDR", 1, 0, 20, 1, 0 },
285 { "DDR VTT", 2, 0, 10, 1, 0 }, 285 { "DDR VTT", 2, 0, 10, 1, 0 },
@@ -402,7 +402,7 @@ static const struct abituguru3_motherboard_info abituguru3_motherboards[] = {
402 { "AUX3 Fan", 36, 2, 60, 1, 0 }, 402 { "AUX3 Fan", 36, 2, 60, 1, 0 },
403 { NULL, 0, 0, 0, 0, 0 } } 403 { NULL, 0, 0, 0, 0, 0 } }
404 }, 404 },
405 { 0x0016, "AW9D-MAX (Intel i975-ICH7)", { 405 { 0x0016, "AW9D-MAX", {
406 { "CPU Core", 0, 0, 10, 1, 0 }, 406 { "CPU Core", 0, 0, 10, 1, 0 },
407 { "DDR2", 1, 0, 20, 1, 0 }, 407 { "DDR2", 1, 0, 20, 1, 0 },
408 { "DDR2 VTT", 2, 0, 10, 1, 0 }, 408 { "DDR2 VTT", 2, 0, 10, 1, 0 },
@@ -482,7 +482,7 @@ static const struct abituguru3_motherboard_info abituguru3_motherboards[] = {
482 { "AUX3 Fan", 36, 2, 60, 1, 0 }, 482 { "AUX3 Fan", 36, 2, 60, 1, 0 },
483 { NULL, 0, 0, 0, 0, 0 } } 483 { NULL, 0, 0, 0, 0, 0 } }
484 }, 484 },
485 { 0x0019, NULL /* Unknown, need DMI string */, { 485 { 0x0019, "IN9 32X MAX", {
486 { "CPU Core", 7, 0, 10, 1, 0 }, 486 { "CPU Core", 7, 0, 10, 1, 0 },
487 { "DDR2", 13, 0, 20, 1, 0 }, 487 { "DDR2", 13, 0, 20, 1, 0 },
488 { "DDR2 VTT", 14, 0, 10, 1, 0 }, 488 { "DDR2 VTT", 14, 0, 10, 1, 0 },
@@ -509,7 +509,7 @@ static const struct abituguru3_motherboard_info abituguru3_motherboards[] = {
509 { "AUX3 FAN", 36, 2, 60, 1, 0 }, 509 { "AUX3 FAN", 36, 2, 60, 1, 0 },
510 { NULL, 0, 0, 0, 0, 0 } } 510 { NULL, 0, 0, 0, 0, 0 } }
511 }, 511 },
512 { 0x001A, "IP35 Pro(Intel P35-ICH9R)", { 512 { 0x001A, "IP35 Pro", {
513 { "CPU Core", 0, 0, 10, 1, 0 }, 513 { "CPU Core", 0, 0, 10, 1, 0 },
514 { "DDR2", 1, 0, 20, 1, 0 }, 514 { "DDR2", 1, 0, 20, 1, 0 },
515 { "DDR2 VTT", 2, 0, 10, 1, 0 }, 515 { "DDR2 VTT", 2, 0, 10, 1, 0 },
@@ -1128,6 +1128,7 @@ static int __init abituguru3_dmi_detect(void)
1128{ 1128{
1129 const char *board_vendor, *board_name; 1129 const char *board_vendor, *board_name;
1130 int i, err = (force) ? 1 : -ENODEV; 1130 int i, err = (force) ? 1 : -ENODEV;
1131 size_t sublen;
1131 1132
1132 board_vendor = dmi_get_system_info(DMI_BOARD_VENDOR); 1133 board_vendor = dmi_get_system_info(DMI_BOARD_VENDOR);
1133 if (!board_vendor || strcmp(board_vendor, "http://www.abit.com.tw/")) 1134 if (!board_vendor || strcmp(board_vendor, "http://www.abit.com.tw/"))
@@ -1137,9 +1138,20 @@ static int __init abituguru3_dmi_detect(void)
1137 if (!board_name) 1138 if (!board_name)
1138 return err; 1139 return err;
1139 1140
1141 /* At the moment, we don't care about the part of the vendor
1142 * DMI string contained in brackets. Truncate the string at
1143 * the first occurrence of a bracket. Trim any trailing space
1144 * from the substring.
1145 */
1146 sublen = strcspn(board_name, "(");
1147 while (sublen > 0 && board_name[sublen - 1] == ' ')
1148 sublen--;
1149
1140 for (i = 0; abituguru3_motherboards[i].id; i++) { 1150 for (i = 0; abituguru3_motherboards[i].id; i++) {
1141 const char *dmi_name = abituguru3_motherboards[i].dmi_name; 1151 const char *dmi_name = abituguru3_motherboards[i].dmi_name;
1142 if (dmi_name && !strcmp(dmi_name, board_name)) 1152 if (!dmi_name || strlen(dmi_name) != sublen)
1153 continue;
1154 if (!strncasecmp(board_name, dmi_name, sublen))
1143 break; 1155 break;
1144 } 1156 }
1145 1157
@@ -1153,7 +1165,7 @@ static int __init abituguru3_dmi_detect(void)
1153 1165
1154static inline int abituguru3_dmi_detect(void) 1166static inline int abituguru3_dmi_detect(void)
1155{ 1167{
1156 return -ENODEV; 1168 return 1;
1157} 1169}
1158 1170
1159#endif /* CONFIG_DMI */ 1171#endif /* CONFIG_DMI */