aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/platform/x86/asus-wmi.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/platform/x86/asus-wmi.c')
-rw-r--r--drivers/platform/x86/asus-wmi.c21
1 files changed, 11 insertions, 10 deletions
diff --git a/drivers/platform/x86/asus-wmi.c b/drivers/platform/x86/asus-wmi.c
index c11b2426dac1..19c313b056c3 100644
--- a/drivers/platform/x86/asus-wmi.c
+++ b/drivers/platform/x86/asus-wmi.c
@@ -558,7 +558,7 @@ static int asus_wmi_led_init(struct asus_wmi *asus)
558 goto error; 558 goto error;
559 } 559 }
560 560
561 if (wlan_led_presence(asus)) { 561 if (wlan_led_presence(asus) && (asus->driver->quirks->wapf == 4)) {
562 INIT_WORK(&asus->wlan_led_work, wlan_led_update); 562 INIT_WORK(&asus->wlan_led_work, wlan_led_update);
563 563
564 asus->wlan_led.name = "asus::wlan"; 564 asus->wlan_led.name = "asus::wlan";
@@ -886,7 +886,8 @@ static int asus_new_rfkill(struct asus_wmi *asus,
886 if (!*rfkill) 886 if (!*rfkill)
887 return -EINVAL; 887 return -EINVAL;
888 888
889 if (dev_id == ASUS_WMI_DEVID_WLAN) 889 if ((dev_id == ASUS_WMI_DEVID_WLAN) &&
890 (asus->driver->quirks->wapf == 4))
890 rfkill_set_led_trigger_name(*rfkill, "asus-wlan"); 891 rfkill_set_led_trigger_name(*rfkill, "asus-wlan");
891 892
892 rfkill_init_sw_state(*rfkill, !result); 893 rfkill_init_sw_state(*rfkill, !result);
@@ -1045,7 +1046,7 @@ static ssize_t asus_hwmon_pwm1(struct device *dev,
1045 else if (value == 3) 1046 else if (value == 3)
1046 value = 255; 1047 value = 255;
1047 else if (value != 0) { 1048 else if (value != 0) {
1048 pr_err("Unknown fan speed %#x", value); 1049 pr_err("Unknown fan speed %#x\n", value);
1049 value = -1; 1050 value = -1;
1050 } 1051 }
1051 1052
@@ -1557,11 +1558,11 @@ static int asus_wmi_platform_init(struct asus_wmi *asus)
1557 1558
1558 /* INIT enable hotkeys on some models */ 1559 /* INIT enable hotkeys on some models */
1559 if (!asus_wmi_evaluate_method(ASUS_WMI_METHODID_INIT, 0, 0, &rv)) 1560 if (!asus_wmi_evaluate_method(ASUS_WMI_METHODID_INIT, 0, 0, &rv))
1560 pr_info("Initialization: %#x", rv); 1561 pr_info("Initialization: %#x\n", rv);
1561 1562
1562 /* We don't know yet what to do with this version... */ 1563 /* We don't know yet what to do with this version... */
1563 if (!asus_wmi_evaluate_method(ASUS_WMI_METHODID_SPEC, 0, 0x9, &rv)) { 1564 if (!asus_wmi_evaluate_method(ASUS_WMI_METHODID_SPEC, 0, 0x9, &rv)) {
1564 pr_info("BIOS WMI version: %d.%d", rv >> 16, rv & 0xFF); 1565 pr_info("BIOS WMI version: %d.%d\n", rv >> 16, rv & 0xFF);
1565 asus->spec = rv; 1566 asus->spec = rv;
1566 } 1567 }
1567 1568
@@ -1572,7 +1573,7 @@ static int asus_wmi_platform_init(struct asus_wmi *asus)
1572 * The significance of others is yet to be found. 1573 * The significance of others is yet to be found.
1573 */ 1574 */
1574 if (!asus_wmi_evaluate_method(ASUS_WMI_METHODID_SFUN, 0, 0, &rv)) { 1575 if (!asus_wmi_evaluate_method(ASUS_WMI_METHODID_SFUN, 0, 0, &rv)) {
1575 pr_info("SFUN value: %#x", rv); 1576 pr_info("SFUN value: %#x\n", rv);
1576 asus->sfun = rv; 1577 asus->sfun = rv;
1577 } 1578 }
1578 1579
@@ -1712,7 +1713,7 @@ static int asus_wmi_debugfs_init(struct asus_wmi *asus)
1712 1713
1713 asus->debug.root = debugfs_create_dir(asus->driver->name, NULL); 1714 asus->debug.root = debugfs_create_dir(asus->driver->name, NULL);
1714 if (!asus->debug.root) { 1715 if (!asus->debug.root) {
1715 pr_err("failed to create debugfs directory"); 1716 pr_err("failed to create debugfs directory\n");
1716 goto error_debugfs; 1717 goto error_debugfs;
1717 } 1718 }
1718 1719
@@ -1985,17 +1986,17 @@ EXPORT_SYMBOL_GPL(asus_wmi_unregister_driver);
1985static int __init asus_wmi_init(void) 1986static int __init asus_wmi_init(void)
1986{ 1987{
1987 if (!wmi_has_guid(ASUS_WMI_MGMT_GUID)) { 1988 if (!wmi_has_guid(ASUS_WMI_MGMT_GUID)) {
1988 pr_info("Asus Management GUID not found"); 1989 pr_info("Asus Management GUID not found\n");
1989 return -ENODEV; 1990 return -ENODEV;
1990 } 1991 }
1991 1992
1992 pr_info("ASUS WMI generic driver loaded"); 1993 pr_info("ASUS WMI generic driver loaded\n");
1993 return 0; 1994 return 0;
1994} 1995}
1995 1996
1996static void __exit asus_wmi_exit(void) 1997static void __exit asus_wmi_exit(void)
1997{ 1998{
1998 pr_info("ASUS WMI generic driver unloaded"); 1999 pr_info("ASUS WMI generic driver unloaded\n");
1999} 2000}
2000 2001
2001module_init(asus_wmi_init); 2002module_init(asus_wmi_init);