aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/pci/hotplug/acpiphp_ibm.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/pci/hotplug/acpiphp_ibm.c')
-rw-r--r--drivers/pci/hotplug/acpiphp_ibm.c12
1 files changed, 5 insertions, 7 deletions
diff --git a/drivers/pci/hotplug/acpiphp_ibm.c b/drivers/pci/hotplug/acpiphp_ibm.c
index 5befa7e379b7..a9d926b7d805 100644
--- a/drivers/pci/hotplug/acpiphp_ibm.c
+++ b/drivers/pci/hotplug/acpiphp_ibm.c
@@ -398,23 +398,21 @@ static acpi_status __init ibm_find_acpi_device(acpi_handle handle,
398 acpi_handle *phandle = (acpi_handle *)context; 398 acpi_handle *phandle = (acpi_handle *)context;
399 acpi_status status; 399 acpi_status status;
400 struct acpi_device_info *info; 400 struct acpi_device_info *info;
401 struct acpi_buffer info_buffer = { ACPI_ALLOCATE_BUFFER, NULL };
402 int retval = 0; 401 int retval = 0;
403 402
404 status = acpi_get_object_info(handle, &info_buffer); 403 status = acpi_get_object_info(handle, &info);
405 if (ACPI_FAILURE(status)) { 404 if (ACPI_FAILURE(status)) {
406 err("%s: Failed to get device information status=0x%x\n", 405 err("%s: Failed to get device information status=0x%x\n",
407 __func__, status); 406 __func__, status);
408 return retval; 407 return retval;
409 } 408 }
410 info = info_buffer.pointer; 409 info->hardware_id.string[sizeof(info->hardware_id.length) - 1] = '\0';
411 info->hardware_id.value[sizeof(info->hardware_id.value) - 1] = '\0';
412 410
413 if (info->current_status && (info->valid & ACPI_VALID_HID) && 411 if (info->current_status && (info->valid & ACPI_VALID_HID) &&
414 (!strcmp(info->hardware_id.value, IBM_HARDWARE_ID1) || 412 (!strcmp(info->hardware_id.string, IBM_HARDWARE_ID1) ||
415 !strcmp(info->hardware_id.value, IBM_HARDWARE_ID2))) { 413 !strcmp(info->hardware_id.string, IBM_HARDWARE_ID2))) {
416 dbg("found hardware: %s, handle: %p\n", 414 dbg("found hardware: %s, handle: %p\n",
417 info->hardware_id.value, handle); 415 info->hardware_id.string, handle);
418 *phandle = handle; 416 *phandle = handle;
419 /* returning non-zero causes the search to stop 417 /* returning non-zero causes the search to stop
420 * and returns this value to the caller of 418 * and returns this value to the caller of