]> asedeno.scripts.mit.edu Git - linux.git/blobdiff - drivers/platform/x86/ideapad-laptop.c
Merge tag 'mips_fixes_4.16_2' of git://git.kernel.org/pub/scm/linux/kernel/git/jhogan...
[linux.git] / drivers / platform / x86 / ideapad-laptop.c
index 53ab4e0f896255614b2462d5323a03e53959a73e..535199c9e6bc6fa182ea9612fcabf85a7ba02ba8 100644 (file)
@@ -113,7 +113,7 @@ MODULE_PARM_DESC(no_bt_rfkill, "No rfkill for bluetooth.");
 /*
  * ACPI Helpers
  */
-#define IDEAPAD_EC_TIMEOUT (100) /* in ms */
+#define IDEAPAD_EC_TIMEOUT (200) /* in ms */
 
 static int read_method_int(acpi_handle handle, const char *method, int *val)
 {
@@ -124,10 +124,10 @@ static int read_method_int(acpi_handle handle, const char *method, int *val)
        if (ACPI_FAILURE(status)) {
                *val = -1;
                return -1;
-       } else {
-               *val = result;
-               return 0;
        }
+       *val = result;
+       return 0;
+
 }
 
 static int method_gbmd(acpi_handle handle, unsigned long *ret)
@@ -164,10 +164,10 @@ static int method_vpcr(acpi_handle handle, int cmd, int *ret)
        if (ACPI_FAILURE(status)) {
                *ret = -1;
                return -1;
-       } else {
-               *ret = result;
-               return 0;
        }
+       *ret = result;
+       return 0;
+
 }
 
 static int method_vpcw(acpi_handle handle, int cmd, int data)
@@ -231,7 +231,7 @@ static int write_ec_cmd(acpi_handle handle, int cmd, unsigned long data)
                if (val == 0)
                        return 0;
        }
-       pr_err("timeout in write_ec_cmd\n");
+       pr_err("timeout in %s\n", __func__);
        return -1;
 }
 
@@ -284,19 +284,7 @@ static int debugfs_status_show(struct seq_file *s, void *data)
 
        return 0;
 }
-
-static int debugfs_status_open(struct inode *inode, struct file *file)
-{
-       return single_open(file, debugfs_status_show, inode->i_private);
-}
-
-static const struct file_operations debugfs_status_fops = {
-       .owner = THIS_MODULE,
-       .open = debugfs_status_open,
-       .read = seq_read,
-       .llseek = seq_lseek,
-       .release = single_release,
-};
+DEFINE_SHOW_ATTRIBUTE(debugfs_status);
 
 static int debugfs_cfg_show(struct seq_file *s, void *data)
 {
@@ -337,19 +325,7 @@ static int debugfs_cfg_show(struct seq_file *s, void *data)
        }
        return 0;
 }
-
-static int debugfs_cfg_open(struct inode *inode, struct file *file)
-{
-       return single_open(file, debugfs_cfg_show, inode->i_private);
-}
-
-static const struct file_operations debugfs_cfg_fops = {
-       .owner = THIS_MODULE,
-       .open = debugfs_cfg_open,
-       .read = seq_read,
-       .llseek = seq_lseek,
-       .release = single_release,
-};
+DEFINE_SHOW_ATTRIBUTE(debugfs_cfg);
 
 static int ideapad_debugfs_init(struct ideapad_private *priv)
 {
@@ -963,6 +939,13 @@ static void ideapad_wmi_notify(u32 value, void *context)
  * report all radios as hardware-blocked.
  */
 static const struct dmi_system_id no_hw_rfkill_list[] = {
+       {
+               .ident = "Lenovo RESCUER R720-15IKBN",
+               .matches = {
+                       DMI_MATCH(DMI_SYS_VENDOR, "LENOVO"),
+                       DMI_MATCH(DMI_BOARD_NAME, "80WW"),
+               },
+       },
        {
                .ident = "Lenovo G40-30",
                .matches = {
@@ -1103,6 +1086,13 @@ static const struct dmi_system_id no_hw_rfkill_list[] = {
                        DMI_MATCH(DMI_PRODUCT_VERSION, "Lenovo Y520-15IKBN"),
                },
        },
+       {
+               .ident = "Lenovo Legion Y720-15IKB",
+               .matches = {
+                       DMI_MATCH(DMI_SYS_VENDOR, "LENOVO"),
+                       DMI_MATCH(DMI_PRODUCT_VERSION, "Lenovo Y720-15IKB"),
+               },
+       },
        {
                .ident = "Lenovo Legion Y720-15IKBN",
                .matches = {