Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 297018
b: refs/heads/master
c: 7a61d02
h: refs/heads/master
v: v3
  • Loading branch information
Corentin Chary authored and Matthew Garrett committed Mar 26, 2012
1 parent bb7d00e commit 9a25384
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 15 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: c55d995dd3cebffdeb2b7eff8acc813c56d62c97
refs/heads/master: 7a61d0207465e41b7dbe3a25f628ddef24572c6f
34 changes: 20 additions & 14 deletions trunk/drivers/platform/x86/eeepc-wmi.c
Original file line number Diff line number Diff line change
Expand Up @@ -109,26 +109,32 @@ static struct quirk_entry quirk_asus_et2012_type3 = {

static struct quirk_entry *quirks;

static void et2012_quirks(void)
{
const struct dmi_device *dev = NULL;
char oemstring[30];

while ((dev = dmi_find_device(DMI_DEV_TYPE_OEM_STRING, NULL, dev))) {
if (sscanf(dev->name, "AEMS%24c", oemstring) == 1) {
if (oemstring[18] == '1')
quirks = &quirk_asus_et2012_type1;
else if (oemstring[18] == '3')
quirks = &quirk_asus_et2012_type3;
break;
}
}
}

static int dmi_matched(const struct dmi_system_id *dmi)
{
char *model;

quirks = dmi->driver_data;

model = (char *)dmi->matches[1].substr;
if (unlikely(strncmp(model, "ET2012", 6) == 0)) {
const struct dmi_device *dev = NULL;
char oemstring[30];
while ((dev = dmi_find_device(DMI_DEV_TYPE_OEM_STRING,
NULL, dev))) {
if (sscanf(dev->name, "AEMS%24c", oemstring) == 1) {
if (oemstring[18] == '1')
quirks = &quirk_asus_et2012_type1;
else if (oemstring[18] == '3')
quirks = &quirk_asus_et2012_type3;
break;
}
}
}
if (unlikely(strncmp(model, "ET2012", 6) == 0))
et2012_quirks();

return 1;
}

Expand Down

0 comments on commit 9a25384

Please sign in to comment.