aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/acpi/container.c
diff options
context:
space:
mode:
authorBob Moore <robert.moore@intel.com>2009-06-29 01:39:29 -0400
committerLen Brown <len.brown@intel.com>2009-08-27 10:17:15 -0400
commit15b8dd53f5ffaf8e2d9095c423f713423f576c0f (patch)
tree773f09435b14a810372642502352d46c29b6f148 /drivers/acpi/container.c
parent9c61b34cf7078da72cce276ff8cfae5d6e9955bc (diff)
ACPICA: Major update for acpi_get_object_info external interface
Completed a major update for the acpi_get_object_info external interface. Changes include: - Support for variable, unlimited length HID, UID, and CID strings - Support Processor objects the same as Devices (HID,UID,CID,ADR,STA, etc.) - Call the _SxW power methods on behalf of a device object - Determine if a device is a PCI root bridge - Change the ACPI_BUFFER parameter to ACPI_DEVICE_INFO. These changes will require an update to all callers of this interface. See the ACPICA Programmer Reference for details. Also, update all invocations of acpi_get_object_info interface Signed-off-by: Bob Moore <robert.moore@intel.com> Signed-off-by: Lin Ming <ming.m.lin@intel.com> Signed-off-by: Len Brown <len.brown@intel.com>
Diffstat (limited to 'drivers/acpi/container.c')
-rw-r--r--drivers/acpi/container.c11
1 files changed, 4 insertions, 7 deletions
diff --git a/drivers/acpi/container.c b/drivers/acpi/container.c
index fe0cdf83641a..2aee8c24dc56 100644
--- a/drivers/acpi/container.c
+++ b/drivers/acpi/container.c
@@ -200,20 +200,17 @@ container_walk_namespace_cb(acpi_handle handle,
200 u32 lvl, void *context, void **rv) 200 u32 lvl, void *context, void **rv)
201{ 201{
202 char *hid = NULL; 202 char *hid = NULL;
203 struct acpi_buffer buffer = { ACPI_ALLOCATE_BUFFER, NULL };
204 struct acpi_device_info *info; 203 struct acpi_device_info *info;
205 acpi_status status; 204 acpi_status status;
206 int *action = context; 205 int *action = context;
207 206
208 207 status = acpi_get_object_info(handle, &info);
209 status = acpi_get_object_info(handle, &buffer); 208 if (ACPI_FAILURE(status)) {
210 if (ACPI_FAILURE(status) || !buffer.pointer) {
211 return AE_OK; 209 return AE_OK;
212 } 210 }
213 211
214 info = buffer.pointer;
215 if (info->valid & ACPI_VALID_HID) 212 if (info->valid & ACPI_VALID_HID)
216 hid = info->hardware_id.value; 213 hid = info->hardware_id.string;
217 214
218 if (hid == NULL) { 215 if (hid == NULL) {
219 goto end; 216 goto end;
@@ -240,7 +237,7 @@ container_walk_namespace_cb(acpi_handle handle,
240 } 237 }
241 238
242 end: 239 end:
243 kfree(buffer.pointer); 240 kfree(info);
244 241
245 return AE_OK; 242 return AE_OK;
246} 243}