Skip to content

Commit 04900fa

Browse files
jwrdegoederafaeljw
authored andcommitted
ACPI / AC: Cleanup DMI quirk table
The 3 different entries we have sofar all use different identation and 2 of the use DMI_MATCH where as 1 unnecessarily used DMI_EXACT_MATCH Fix this to just use full tab idents for each level and DMI_MATCH everywhere and sort the entries alphabetically. Also add a bit of text to the comments explaining why the quirk is necessary. Signed-off-by: Hans de Goede <[email protected]> Signed-off-by: Rafael J. Wysocki <[email protected]>
1 parent 98d54f8 commit 04900fa

File tree

1 file changed

+13
-12
lines changed

1 file changed

+13
-12
lines changed

drivers/acpi/ac.c

Lines changed: 13 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -293,29 +293,30 @@ static int __init ac_do_not_check_pmic_quirk(const struct dmi_system_id *d)
293293
return 0;
294294
}
295295

296+
/* Please keep this list alphabetically sorted */
296297
static const struct dmi_system_id ac_dmi_table[] __initconst = {
297298
{
298-
/* Thinkpad e530 */
299-
.callback = thinkpad_e530_quirk,
300-
.matches = {
301-
DMI_MATCH(DMI_SYS_VENDOR, "LENOVO"),
302-
DMI_MATCH(DMI_PRODUCT_NAME, "32597CG"),
299+
/* ECS EF20EA, AXP288 PMIC but uses separate fuel-gauge */
300+
.callback = ac_do_not_check_pmic_quirk,
301+
.matches = {
302+
DMI_MATCH(DMI_PRODUCT_NAME, "EF20EA"),
303303
},
304304
},
305305
{
306-
/* ECS EF20EA */
306+
/* Lenovo Ideapad Miix 320, AXP288 PMIC, separate fuel-gauge */
307307
.callback = ac_do_not_check_pmic_quirk,
308308
.matches = {
309-
DMI_MATCH(DMI_PRODUCT_NAME, "EF20EA"),
309+
DMI_MATCH(DMI_SYS_VENDOR, "LENOVO"),
310+
DMI_MATCH(DMI_PRODUCT_NAME, "80XF"),
311+
DMI_MATCH(DMI_PRODUCT_VERSION, "Lenovo MIIX 320-10ICR"),
310312
},
311313
},
312314
{
313-
/* Lenovo Ideapad Miix 320 */
314-
.callback = ac_do_not_check_pmic_quirk,
315+
/* Lenovo Thinkpad e530, see comment in acpi_ac_notify() */
316+
.callback = thinkpad_e530_quirk,
315317
.matches = {
316-
DMI_EXACT_MATCH(DMI_SYS_VENDOR, "LENOVO"),
317-
DMI_EXACT_MATCH(DMI_PRODUCT_NAME, "80XF"),
318-
DMI_EXACT_MATCH(DMI_PRODUCT_VERSION, "Lenovo MIIX 320-10ICR"),
318+
DMI_MATCH(DMI_SYS_VENDOR, "LENOVO"),
319+
DMI_MATCH(DMI_PRODUCT_NAME, "32597CG"),
319320
},
320321
},
321322
{},

0 commit comments

Comments
 (0)