eeepc-wmi: split et2012 specific hacks
Signed-off-by: Corentin Chary <corentin.chary@gmail.com> Signed-off-by: Matthew Garrett <mjg@redhat.com>
This commit is contained in:
Родитель
c55d995dd3
Коммит
7a61d02074
|
@ -109,17 +109,12 @@ static struct quirk_entry quirk_asus_et2012_type3 = {
|
||||||
|
|
||||||
static struct quirk_entry *quirks;
|
static struct quirk_entry *quirks;
|
||||||
|
|
||||||
static int dmi_matched(const struct dmi_system_id *dmi)
|
static void et2012_quirks(void)
|
||||||
{
|
{
|
||||||
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;
|
const struct dmi_device *dev = NULL;
|
||||||
char oemstring[30];
|
char oemstring[30];
|
||||||
while ((dev = dmi_find_device(DMI_DEV_TYPE_OEM_STRING,
|
|
||||||
NULL, dev))) {
|
while ((dev = dmi_find_device(DMI_DEV_TYPE_OEM_STRING, NULL, dev))) {
|
||||||
if (sscanf(dev->name, "AEMS%24c", oemstring) == 1) {
|
if (sscanf(dev->name, "AEMS%24c", oemstring) == 1) {
|
||||||
if (oemstring[18] == '1')
|
if (oemstring[18] == '1')
|
||||||
quirks = &quirk_asus_et2012_type1;
|
quirks = &quirk_asus_et2012_type1;
|
||||||
|
@ -128,7 +123,18 @@ static int dmi_matched(const struct dmi_system_id *dmi)
|
||||||
break;
|
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))
|
||||||
|
et2012_quirks();
|
||||||
|
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Загрузка…
Ссылка в новой задаче