]> git.karo-electronics.de Git - linux-beck.git/commitdiff
eeepc-wmi: refine quirks handling
authorCorentin Chary <corentin.chary@gmail.com>
Tue, 20 Mar 2012 08:53:12 +0000 (09:53 +0100)
committerMatthew Garrett <mjg@redhat.com>
Mon, 26 Mar 2012 19:05:47 +0000 (15:05 -0400)
Signed-off-by: Corentin Chary <corentin.chary@gmail.com>
Signed-off-by: Matthew Garrett <mjg@redhat.com>
drivers/platform/x86/eeepc-wmi.c

index 389ff888cb6c5a78c4b775c76a884137f56d8d7c..0bb0aaf43aba14bf7eeecdc8ed162404e849e5e3 100644 (file)
@@ -49,7 +49,6 @@ MODULE_LICENSE("GPL");
 
 MODULE_ALIAS("wmi:"EEEPC_WMI_EVENT_GUID);
 
-static struct quirk_entry *quirks;
 static bool hotplug_wireless;
 
 module_param(hotplug_wireless, bool, 0444);
@@ -108,6 +107,8 @@ static struct quirk_entry quirk_asus_et2012_type3 = {
        .store_backlight_power = true,
 };
 
+static struct quirk_entry *quirks;
+
 static int dmi_matched(const struct dmi_system_id *dmi)
 {
        char *model;
@@ -209,12 +210,14 @@ static int eeepc_wmi_probe(struct platform_device *pdev)
 
 static void eeepc_wmi_quirks(struct asus_wmi_driver *driver)
 {
-       driver->panel_power = FB_BLANK_UNBLANK;
-       driver->quirks = &quirk_asus_unknown;
-       driver->quirks->hotplug_wireless = hotplug_wireless;
-       driver->quirks->wapf = -1;
+       quirks = &quirk_asus_unknown;
+       quirks->hotplug_wireless = hotplug_wireless;
+
        dmi_check_system(asus_quirks);
+
        driver->quirks = quirks;
+       driver->quirks->wapf = -1;
+       driver->panel_power = FB_BLANK_UNBLANK;
 }
 
 static struct asus_wmi_driver asus_wmi_driver = {