From 6f8371c05e64138c305aa1b6a21857cd7a50e147 Mon Sep 17 00:00:00 2001 From: Ike Panhc Date: Fri, 1 Oct 2010 15:39:14 +0800 Subject: [PATCH] ideapad: make sure we bind on the correct device By reading from method _CFG to make sure we bind on the correct VPC2004 device. Signed-off-by: Ike Panhc Signed-off-by: Matthew Garrett --- drivers/platform/x86/ideapad_acpi.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/drivers/platform/x86/ideapad_acpi.c b/drivers/platform/x86/ideapad_acpi.c index e07d6072e75c..bf684f421290 100644 --- a/drivers/platform/x86/ideapad_acpi.c +++ b/drivers/platform/x86/ideapad_acpi.c @@ -326,10 +326,13 @@ MODULE_DEVICE_TABLE(acpi, ideapad_device_ids); static int ideapad_acpi_add(struct acpi_device *adevice) { - int i; + int i, cfg; int devs_present[5]; struct ideapad_private *priv; + if (read_method_int(adevice->handle, "_CFG", &cfg)) + return -ENODEV; + for (i = IDEAPAD_DEV_CAMERA; i < IDEAPAD_DEV_KILLSW; i++) { devs_present[i] = ideapad_dev_exists(i); if (devs_present[i] < 0) -- GitLab