diff options
author | Bjorn Helgaas <bjorn.helgaas@hp.com> | 2009-09-21 15:35:04 -0400 |
---|---|---|
committer | Len Brown <len.brown@intel.com> | 2009-09-25 14:25:29 -0400 |
commit | 78b8e141f8458ba0b8ac53c45bc327112c53887e (patch) | |
tree | cd8e3264d85f7bf57946697384a9fead97b84f44 /drivers/acpi | |
parent | e3b87f8a9d5a61f6367c66d1bb0a4e19d251194d (diff) |
ACPI: fix synthetic HID for \_SB_
This makes \_SB_ show up as /sys/devices/LNXSYSTM:00/LNXSYBUS:00
rather than "device:00". This has been broken for a loooong time
(at least since 2.6.13) because device->parent is an acpi_device
pointer, not a handle.
Signed-off-by: Bjorn Helgaas <bjorn.helgaas@hp.com>
Signed-off-by: Len Brown <len.brown@intel.com>
Diffstat (limited to 'drivers/acpi')
-rw-r--r-- | drivers/acpi/scan.c | 18 |
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) { |