Commit c55d995dd3cebffdeb2b7eff8acc813c56d62c97

Authored by Corentin Chary
Committed by Matthew Garrett
1 parent fb05b9f53f

eeepc-wmi: refine quirks handling

Signed-off-by: Corentin Chary <corentin.chary@gmail.com>
Signed-off-by: Matthew Garrett <mjg@redhat.com>

Showing 1 changed file with 8 additions and 5 deletions Side-by-side Diff

drivers/platform/x86/eeepc-wmi.c
... ... @@ -49,7 +49,6 @@
49 49  
50 50 MODULE_ALIAS("wmi:"EEEPC_WMI_EVENT_GUID);
51 51  
52   -static struct quirk_entry *quirks;
53 52 static bool hotplug_wireless;
54 53  
55 54 module_param(hotplug_wireless, bool, 0444);
... ... @@ -108,6 +107,8 @@
108 107 .store_backlight_power = true,
109 108 };
110 109  
  110 +static struct quirk_entry *quirks;
  111 +
111 112 static int dmi_matched(const struct dmi_system_id *dmi)
112 113 {
113 114 char *model;
114 115  
115 116  
... ... @@ -209,12 +210,14 @@
209 210  
210 211 static void eeepc_wmi_quirks(struct asus_wmi_driver *driver)
211 212 {
212   - driver->panel_power = FB_BLANK_UNBLANK;
213   - driver->quirks = &quirk_asus_unknown;
214   - driver->quirks->hotplug_wireless = hotplug_wireless;
215   - driver->quirks->wapf = -1;
  213 + quirks = &quirk_asus_unknown;
  214 + quirks->hotplug_wireless = hotplug_wireless;
  215 +
216 216 dmi_check_system(asus_quirks);
  217 +
217 218 driver->quirks = quirks;
  219 + driver->quirks->wapf = -1;
  220 + driver->panel_power = FB_BLANK_UNBLANK;
218 221 }
219 222  
220 223 static struct asus_wmi_driver asus_wmi_driver = {