From 67186653c90360922e3965d0376a61dbf6c42711 Mon Sep 17 00:00:00 2001 From: Andy Shevchenko Date: Sun, 2 Aug 2020 14:07:04 +0300 Subject: [PATCH] platform/x86: asus-nb-wmi: Drop duplicate DMI quirk structures There is no need to repeat the same data structure for a quirk. Drop a duplicate and rename to be more generic. Signed-off-by: Andy Shevchenko --- drivers/platform/x86/asus-nb-wmi.c | 23 +++++++++-------------- 1 file changed, 9 insertions(+), 14 deletions(-) diff --git a/drivers/platform/x86/asus-nb-wmi.c b/drivers/platform/x86/asus-nb-wmi.c index 6c42f73c1dfd..b2e3d1e3b3e9 100644 --- a/drivers/platform/x86/asus-nb-wmi.c +++ b/drivers/platform/x86/asus-nb-wmi.c @@ -110,12 +110,7 @@ static struct quirk_entry quirk_asus_forceals = { .wmi_force_als_set = true, }; -static struct quirk_entry quirk_asus_ga401i = { - .wmi_backlight_power = true, - .wmi_backlight_set_devstate = true, -}; - -static struct quirk_entry quirk_asus_ga502i = { +static struct quirk_entry quirk_asus_vendor_backlight = { .wmi_backlight_power = true, .wmi_backlight_set_devstate = true, }; @@ -428,7 +423,7 @@ static const struct dmi_system_id asus_quirks[] = { DMI_MATCH(DMI_SYS_VENDOR, "ASUSTeK COMPUTER INC."), DMI_MATCH(DMI_PRODUCT_NAME, "GA401IH"), }, - .driver_data = &quirk_asus_ga401i, + .driver_data = &quirk_asus_vendor_backlight, }, { .callback = dmi_matched, @@ -437,7 +432,7 @@ static const struct dmi_system_id asus_quirks[] = { DMI_MATCH(DMI_SYS_VENDOR, "ASUSTeK COMPUTER INC."), DMI_MATCH(DMI_PRODUCT_NAME, "GA401II"), }, - .driver_data = &quirk_asus_ga401i, + .driver_data = &quirk_asus_vendor_backlight, }, { .callback = dmi_matched, @@ -446,7 +441,7 @@ static const struct dmi_system_id asus_quirks[] = { DMI_MATCH(DMI_SYS_VENDOR, "ASUSTeK COMPUTER INC."), DMI_MATCH(DMI_PRODUCT_NAME, "GA401IU"), }, - .driver_data = &quirk_asus_ga401i, + .driver_data = &quirk_asus_vendor_backlight, }, { .callback = dmi_matched, @@ -455,7 +450,7 @@ static const struct dmi_system_id asus_quirks[] = { DMI_MATCH(DMI_SYS_VENDOR, "ASUSTeK COMPUTER INC."), DMI_MATCH(DMI_PRODUCT_NAME, "GA401IV"), }, - .driver_data = &quirk_asus_ga401i, + .driver_data = &quirk_asus_vendor_backlight, }, { .callback = dmi_matched, @@ -464,7 +459,7 @@ static const struct dmi_system_id asus_quirks[] = { DMI_MATCH(DMI_SYS_VENDOR, "ASUSTeK COMPUTER INC."), DMI_MATCH(DMI_PRODUCT_NAME, "GA401IVC"), }, - .driver_data = &quirk_asus_ga401i, + .driver_data = &quirk_asus_vendor_backlight, }, { .callback = dmi_matched, @@ -473,7 +468,7 @@ static const struct dmi_system_id asus_quirks[] = { DMI_MATCH(DMI_SYS_VENDOR, "ASUSTeK COMPUTER INC."), DMI_MATCH(DMI_PRODUCT_NAME, "GA502II"), }, - .driver_data = &quirk_asus_ga502i, + .driver_data = &quirk_asus_vendor_backlight, }, { .callback = dmi_matched, @@ -482,7 +477,7 @@ static const struct dmi_system_id asus_quirks[] = { DMI_MATCH(DMI_SYS_VENDOR, "ASUSTeK COMPUTER INC."), DMI_MATCH(DMI_PRODUCT_NAME, "GA502IU"), }, - .driver_data = &quirk_asus_ga502i, + .driver_data = &quirk_asus_vendor_backlight, }, { .callback = dmi_matched, @@ -491,7 +486,7 @@ static const struct dmi_system_id asus_quirks[] = { DMI_MATCH(DMI_SYS_VENDOR, "ASUSTeK COMPUTER INC."), DMI_MATCH(DMI_PRODUCT_NAME, "GA502IV"), }, - .driver_data = &quirk_asus_ga502i, + .driver_data = &quirk_asus_vendor_backlight, }, {}, };