public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/2] asus-laptop: let WLED alone on L1400B
@ 2011-02-06 12:27 Corentin Chary
  2011-02-06 12:27 ` [PATCH 2/2] asus-laptop: remove deprecated interfaces (lcd_switch and display_get) Corentin Chary
  2011-02-07 19:38 ` [PATCH 1/2] asus-laptop: let WLED alone on L1400B Matthew Garrett
  0 siblings, 2 replies; 3+ messages in thread
From: Corentin Chary @ 2011-02-06 12:27 UTC (permalink / raw)
  To: Matthew Garrett
  Cc: Corentin Chary, Corentin Chary, acpi4asus-user,
	platform-driver-x86, linux-kernel

From: Corentin Chary <corentin.chary@gmail.com>

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>
---
 drivers/platform/x86/asus-laptop.c |   17 +++++++++++++++++
 1 files changed, 17 insertions(+), 0 deletions(-)

diff --git a/drivers/platform/x86/asus-laptop.c b/drivers/platform/x86/asus-laptop.c
index d235f44..1909685 100644
--- a/drivers/platform/x86/asus-laptop.c
+++ b/drivers/platform/x86/asus-laptop.c
@@ -50,6 +50,7 @@
 #include <linux/input/sparse-keymap.h>
 #include <linux/rfkill.h>
 #include <linux/slab.h>
+#include <linux/dmi.h>
 #include <acpi/acpi_drivers.h>
 #include <acpi/acpi_bus.h>
 
@@ -1556,6 +1557,20 @@ static int __devinit asus_acpi_init(struct asus_laptop *asus)
 	return result;
 }
 
+static void __devinit asus_dmi_check(void)
+{
+	const char *model;
+
+	model = dmi_get_system_info(DMI_PRODUCT_NAME);
+	if (!model)
+		return;
+
+	/* On L1400B WLED control the sound card, don't mess with it ... */
+	if (strncmp(model, "L1400B", 6) == 0) {
+		wlan_status = -1;
+	}
+}
+
 static bool asus_device_present;
 
 static int __devinit asus_acpi_add(struct acpi_device *device)
@@ -1574,6 +1589,8 @@ static int __devinit asus_acpi_add(struct acpi_device *device)
 	device->driver_data = asus;
 	asus->device = device;
 
+	asus_dmi_check();
+
 	result = asus_acpi_init(asus);
 	if (result)
 		goto fail_platform;
-- 
1.7.4.rc3


^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2011-02-07 19:38 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-02-06 12:27 [PATCH 1/2] asus-laptop: let WLED alone on L1400B Corentin Chary
2011-02-06 12:27 ` [PATCH 2/2] asus-laptop: remove deprecated interfaces (lcd_switch and display_get) Corentin Chary
2011-02-07 19:38 ` [PATCH 1/2] asus-laptop: let WLED alone on L1400B Matthew Garrett

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox