Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 166389
b: refs/heads/master
c: 78b8e14
h: refs/heads/master
i:
  166387: 5af43ee
v: v3
  • Loading branch information
Bjorn Helgaas authored and Len Brown committed Sep 25, 2009
1 parent ae5e963 commit 5388cef
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 13 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: e3b87f8a9d5a61f6367c66d1bb0a4e19d251194d
refs/heads/master: 78b8e141f8458ba0b8ac53c45bc327112c53887e
18 changes: 6 additions & 12 deletions trunk/drivers/acpi/scan.c
Original file line number Diff line number Diff line change
Expand Up @@ -1100,6 +1100,12 @@ static void acpi_device_set_id(struct acpi_device *device)
if (ACPI_IS_ROOT_DEVICE(device)) {
hid = ACPI_SYSTEM_HID;
break;
} else if (ACPI_IS_ROOT_DEVICE(device->parent)) {
/* \_SB_, the only root-level namespace device */
hid = ACPI_BUS_HID;
strcpy(device->pnp.device_name, ACPI_BUS_DEVICE_NAME);
strcpy(device->pnp.device_class, ACPI_BUS_CLASS);
break;
}

status = acpi_get_object_info(device->handle, &info);
Expand Down Expand Up @@ -1149,18 +1155,6 @@ static void acpi_device_set_id(struct acpi_device *device)
break;
}

/*
* \_SB
* ----
* Fix for the system root bus device -- the only root-level device.
*/
if (((acpi_handle)device->parent == ACPI_ROOT_OBJECT) &&
(device->device_type == ACPI_BUS_TYPE_DEVICE)) {
hid = ACPI_BUS_HID;
strcpy(device->pnp.device_name, ACPI_BUS_DEVICE_NAME);
strcpy(device->pnp.device_class, ACPI_BUS_CLASS);
}

if (hid) {
device->pnp.hardware_id = ACPI_ALLOCATE_ZEROED(strlen (hid) + 1);
if (device->pnp.hardware_id) {
Expand Down

0 comments on commit 5388cef

Please sign in to comment.