aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/acpi/scan.c18
1 files changed, 6 insertions, 12 deletions
diff --git a/drivers/acpi/scan.c b/drivers/acpi/scan.c
index 2c4cac576a7e..e9227ea2cb2f 100644
--- a/drivers/acpi/scan.c
+++ b/drivers/acpi/scan.c
@@ -1100,6 +1100,12 @@ static void acpi_device_set_id(struct acpi_device *device)
1100 if (ACPI_IS_ROOT_DEVICE(device)) { 1100 if (ACPI_IS_ROOT_DEVICE(device)) {
1101 hid = ACPI_SYSTEM_HID; 1101 hid = ACPI_SYSTEM_HID;
1102 break; 1102 break;
1103 } else if (ACPI_IS_ROOT_DEVICE(device->parent)) {
1104 /* \_SB_, the only root-level namespace device */
1105 hid = ACPI_BUS_HID;
1106 strcpy(device->pnp.device_name, ACPI_BUS_DEVICE_NAME);
1107 strcpy(device->pnp.device_class, ACPI_BUS_CLASS);
1108 break;
1103 } 1109 }
1104 1110
1105 status = acpi_get_object_info(device->handle, &info); 1111 status = acpi_get_object_info(device->handle, &info);
@@ -1149,18 +1155,6 @@ static void acpi_device_set_id(struct acpi_device *device)
1149 break; 1155 break;
1150 } 1156 }
1151 1157
1152 /*
1153 * \_SB
1154 * ----
1155 * Fix for the system root bus device -- the only root-level device.
1156 */
1157 if (((acpi_handle)device->parent == ACPI_ROOT_OBJECT) &&
1158 (device->device_type == ACPI_BUS_TYPE_DEVICE)) {
1159 hid = ACPI_BUS_HID;
1160 strcpy(device->pnp.device_name, ACPI_BUS_DEVICE_NAME);
1161 strcpy(device->pnp.device_class, ACPI_BUS_CLASS);
1162 }
1163
1164 if (hid) { 1158 if (hid) {
1165 device->pnp.hardware_id = ACPI_ALLOCATE_ZEROED(strlen (hid) + 1); 1159 device->pnp.hardware_id = ACPI_ALLOCATE_ZEROED(strlen (hid) + 1);
1166 if (device->pnp.hardware_id) { 1160 if (device->pnp.hardware_id) {