Skip to content

Commit 4f5f64c

Browse files
committed
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 <[email protected]> Cc: <[email protected]>
1 parent 0271f4f commit 4f5f64c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/acpi/scan.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1346,7 +1346,7 @@ static void acpi_device_set_id(struct acpi_device *device)
13461346
acpi_add_id(device, ACPI_DOCK_HID);
13471347
else if (!acpi_ibm_smbus_match(device))
13481348
acpi_add_id(device, ACPI_SMBUS_IBM_HID);
1349-
else if (!acpi_device_hid(device) &&
1349+
else if (list_empty(&device->pnp.ids) &&
13501350
ACPI_IS_ROOT_DEVICE(device->parent)) {
13511351
acpi_add_id(device, ACPI_BUS_HID); /* \_SB, LNXSYBUS */
13521352
strcpy(device->pnp.device_name, ACPI_BUS_DEVICE_NAME);

0 commit comments

Comments
 (0)