Commit af96f87703f33a4dba4b51c7b3f0d6f874aa4853

Authored by Corentin Chary
Committed by Matthew Garrett
1 parent 77ca5b0197

asus-laptop: let WLED alone on L1400B

Asus took the DSDT from another model (L84F), made some change
to make it work, but forgot to remove WLED method (the laptop
doesn't have a wireless card). They even didn't change the model
name.

ref: https://bugzilla.kernel.org/show_bug.cgi?id=25712

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

Showing 1 changed file with 17 additions and 0 deletions Side-by-side Diff

drivers/platform/x86/asus-laptop.c
... ... @@ -50,6 +50,7 @@
50 50 #include <linux/input/sparse-keymap.h>
51 51 #include <linux/rfkill.h>
52 52 #include <linux/slab.h>
  53 +#include <linux/dmi.h>
53 54 #include <acpi/acpi_drivers.h>
54 55 #include <acpi/acpi_bus.h>
55 56  
... ... @@ -1557,6 +1558,20 @@
1557 1558 return result;
1558 1559 }
1559 1560  
  1561 +static void __devinit asus_dmi_check(void)
  1562 +{
  1563 + const char *model;
  1564 +
  1565 + model = dmi_get_system_info(DMI_PRODUCT_NAME);
  1566 + if (!model)
  1567 + return;
  1568 +
  1569 + /* On L1400B WLED control the sound card, don't mess with it ... */
  1570 + if (strncmp(model, "L1400B", 6) == 0) {
  1571 + wlan_status = -1;
  1572 + }
  1573 +}
  1574 +
1560 1575 static bool asus_device_present;
1561 1576  
1562 1577 static int __devinit asus_acpi_add(struct acpi_device *device)
... ... @@ -1574,6 +1589,8 @@
1574 1589 strcpy(acpi_device_class(device), ASUS_LAPTOP_CLASS);
1575 1590 device->driver_data = asus;
1576 1591 asus->device = device;
  1592 +
  1593 + asus_dmi_check();
1577 1594  
1578 1595 result = asus_acpi_init(asus);
1579 1596 if (result)