agp/hp: fixup hp agp after ACPI changes
[sfrench/cifs-2.6.git] / drivers / char / agp / hp-agp.c
index 501e293e5ad0a1117f5b647f220a002799cef4c3..dc8a6f70483b51a8f1c1945959fcf4cbc552bfaa 100644 (file)
@@ -476,7 +476,6 @@ zx1_gart_probe (acpi_handle obj, u32 depth, void *context, void **ret)
 {
        acpi_handle handle, parent;
        acpi_status status;
-       struct acpi_buffer buffer;
        struct acpi_device_info *info;
        u64 lba_hpa, sba_hpa, length;
        int match;
@@ -488,13 +487,10 @@ zx1_gart_probe (acpi_handle obj, u32 depth, void *context, void **ret)
        /* Look for an enclosing IOC scope and find its CSR space */
        handle = obj;
        do {
-               buffer.length = ACPI_ALLOCATE_LOCAL_BUFFER;
-               status = acpi_get_object_info(handle, &buffer);
-               if (ACPI_SUCCESS(status)) {
+               status = acpi_get_object_info(handle, &info);
+               if (ACPI_SUCCESS(status) && (info->valid & ACPI_VALID_HID)) {
                        /* TBD check _CID also */
-                       info = buffer.pointer;
-                       info->hardware_id.value[sizeof(info->hardware_id)-1] = '\0';
-                       match = (strcmp(info->hardware_id.value, "HWP0001") == 0);
+                       match = (strcmp(info->hardware_id.string, "HWP0001") == 0);
                        kfree(info);
                        if (match) {
                                status = hp_acpi_csr_space(handle, &sba_hpa, &length);