aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/platform
diff options
context:
space:
mode:
authorIke Panhc <ike.pan@canonical.com>2010-10-01 03:39:14 -0400
committerMatthew Garrett <mjg@redhat.com>2010-10-21 09:36:49 -0400
commit6f8371c05e64138c305aa1b6a21857cd7a50e147 (patch)
tree50d8462ed93436ccad764d4e34ff198b60727417 /drivers/platform
parent8e7d354370f61cbe82a8b4a0f74224aed900b410 (diff)
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 <ike.pan@canonical.com> Signed-off-by: Matthew Garrett <mjg@redhat.com>
Diffstat (limited to 'drivers/platform')
-rw-r--r--drivers/platform/x86/ideapad_acpi.c5
1 files changed, 4 insertions, 1 deletions
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);
326 326
327static int ideapad_acpi_add(struct acpi_device *adevice) 327static int ideapad_acpi_add(struct acpi_device *adevice)
328{ 328{
329 int i; 329 int i, cfg;
330 int devs_present[5]; 330 int devs_present[5];
331 struct ideapad_private *priv; 331 struct ideapad_private *priv;
332 332
333 if (read_method_int(adevice->handle, "_CFG", &cfg))
334 return -ENODEV;
335
333 for (i = IDEAPAD_DEV_CAMERA; i < IDEAPAD_DEV_KILLSW; i++) { 336 for (i = IDEAPAD_DEV_CAMERA; i < IDEAPAD_DEV_KILLSW; i++) {
334 devs_present[i] = ideapad_dev_exists(i); 337 devs_present[i] = ideapad_dev_exists(i);
335 if (devs_present[i] < 0) 338 if (devs_present[i] < 0)