]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
ACPI / scan: Do not use dummy HID for system bus ACPI nodes
authorRafael J. Wysocki <rafael.j.wysocki@intel.com>
Fri, 4 Jan 2013 22:00:54 +0000 (23:00 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 11 Jan 2013 17:06:54 +0000 (09:06 -0800)
commit 4f5f64cf0cc916220aaa055992e31195470cfe37 upstream.

At one point acpi_device_set_id() checks if acpi_device_hid(device)
returns NULL, but that never happens, so system bus devices with an
empty list of PNP IDs are given the dummy HID ("device") instead of
the "system bus HID" ("LNXSYBUS").  Fix the code to use the right
check.

Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/acpi/scan.c

index 85cbfdccc97cbfc0dcdcf7c236e57c8c003b0700..bd3199ce5b278ec76ee68e4b7221042c88d82a78 100644 (file)
@@ -1157,7 +1157,7 @@ static void acpi_device_set_id(struct acpi_device *device)
                        acpi_add_id(device, ACPI_DOCK_HID);
                else if (!acpi_ibm_smbus_match(device))
                        acpi_add_id(device, ACPI_SMBUS_IBM_HID);
-               else if (!acpi_device_hid(device) &&
+               else if (list_empty(&device->pnp.ids) &&
                         ACPI_IS_ROOT_DEVICE(device->parent)) {
                        acpi_add_id(device, ACPI_BUS_HID); /* \_SB, LNXSYBUS */
                        strcpy(device->pnp.device_name, ACPI_BUS_DEVICE_NAME);