Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 129708
b: refs/heads/master
c: 058943d
h: refs/heads/master
v: v3
  • Loading branch information
Alistair John Strachan authored and Jean Delvare committed Jan 15, 2009
1 parent c2bdfa5 commit 33f5e8f
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 5 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 1c301fc5394f7e1aa4c201e6e03d55d9c08b3bdf
refs/heads/master: 058943ddcb7cb307a0c406088c1e61f203d8b66f
20 changes: 16 additions & 4 deletions trunk/drivers/hwmon/abituguru3.c
Original file line number Diff line number Diff line change
Expand Up @@ -279,7 +279,7 @@ static const struct abituguru3_motherboard_info abituguru3_motherboards[] = {
{ "OTES1 Fan", 36, 2, 60, 1, 0 },
{ NULL, 0, 0, 0, 0, 0 } }
},
{ 0x0011, "AT8 32X(ATI RD580-ULI M1575)", {
{ 0x0011, "AT8 32X", {
{ "CPU Core", 0, 0, 10, 1, 0 },
{ "DDR", 1, 0, 20, 1, 0 },
{ "DDR VTT", 2, 0, 10, 1, 0 },
Expand Down Expand Up @@ -402,7 +402,7 @@ static const struct abituguru3_motherboard_info abituguru3_motherboards[] = {
{ "AUX3 Fan", 36, 2, 60, 1, 0 },
{ NULL, 0, 0, 0, 0, 0 } }
},
{ 0x0016, "AW9D-MAX (Intel i975-ICH7)", {
{ 0x0016, "AW9D-MAX", {
{ "CPU Core", 0, 0, 10, 1, 0 },
{ "DDR2", 1, 0, 20, 1, 0 },
{ "DDR2 VTT", 2, 0, 10, 1, 0 },
Expand Down Expand Up @@ -509,7 +509,7 @@ static const struct abituguru3_motherboard_info abituguru3_motherboards[] = {
{ "AUX3 FAN", 36, 2, 60, 1, 0 },
{ NULL, 0, 0, 0, 0, 0 } }
},
{ 0x001A, "IP35 Pro(Intel P35-ICH9R)", {
{ 0x001A, "IP35 Pro", {
{ "CPU Core", 0, 0, 10, 1, 0 },
{ "DDR2", 1, 0, 20, 1, 0 },
{ "DDR2 VTT", 2, 0, 10, 1, 0 },
Expand Down Expand Up @@ -1128,6 +1128,7 @@ static int __init abituguru3_dmi_detect(void)
{
const char *board_vendor, *board_name;
int i, err = (force) ? 1 : -ENODEV;
size_t sublen;

board_vendor = dmi_get_system_info(DMI_BOARD_VENDOR);
if (!board_vendor || strcmp(board_vendor, "http://www.abit.com.tw/"))
Expand All @@ -1137,9 +1138,20 @@ static int __init abituguru3_dmi_detect(void)
if (!board_name)
return err;

/* At the moment, we don't care about the part of the vendor
* DMI string contained in brackets. Truncate the string at
* the first occurrence of a bracket. Trim any trailing space
* from the substring.
*/
sublen = strcspn(board_name, "(");
while (sublen > 0 && board_name[sublen - 1] == ' ')
sublen--;

for (i = 0; abituguru3_motherboards[i].id; i++) {
const char *dmi_name = abituguru3_motherboards[i].dmi_name;
if (dmi_name && !strcmp(dmi_name, board_name))
if (!dmi_name || strlen(dmi_name) != sublen)
continue;
if (!strncasecmp(board_name, dmi_name, sublen))
break;
}

Expand Down

0 comments on commit 33f5e8f

Please sign in to comment.