summaryrefslogtreecommitdiffstats
path: root/drivers/acpi/scan.c
diff options
context:
space:
mode:
authorRafael J. Wysocki <rafael.j.wysocki@intel.com>2013-01-04 23:00:54 +0100
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>2013-01-04 23:00:54 +0100
commit4f5f64cf0cc916220aaa055992e31195470cfe37 (patch)
tree37aa1fa12231ad2cd2cb5f0760e234331b216470 /drivers/acpi/scan.c
parent0271f4f1176d7205b2b73ef956b169db8f417932 (diff)
downloadtalos-op-linux-4f5f64cf0cc916220aaa055992e31195470cfe37.tar.gz
talos-op-linux-4f5f64cf0cc916220aaa055992e31195470cfe37.zip
ACPI / scan: Do not use dummy HID for system bus ACPI nodes
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> Cc: <stable@vger.kernel.org>
Diffstat (limited to 'drivers/acpi/scan.c')
-rw-r--r--drivers/acpi/scan.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/acpi/scan.c b/drivers/acpi/scan.c
index 53502d1bbf26..c88be6c37c30 100644
--- a/drivers/acpi/scan.c
+++ b/drivers/acpi/scan.c
@@ -1346,7 +1346,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);
OpenPOWER on IntegriCloud