include cleanup: Update gfp.h and slab.h includes to prepare for breaking implicit...
[safe/jmp/linux-2.6] / drivers / pci / hotplug / acpiphp_ibm.c
index 2b7c45e..6ecbfb2 100644 (file)
@@ -26,6 +26,7 @@
  */
 
 #include <linux/init.h>
+#include <linux/slab.h>
 #include <linux/module.h>
 #include <linux/kernel.h>
 #include <acpi/acpi_bus.h>
@@ -183,7 +184,7 @@ static int ibm_set_attention_status(struct hotplug_slot *slot, u8 status)
        union acpi_object args[2]; 
        struct acpi_object_list params = { .pointer = args, .count = 2 };
        acpi_status stat; 
-       unsigned long rc;
+       unsigned long long rc;
        union apci_descriptor *ibm_slot;
 
        ibm_slot = ibm_slot_from_id(hpslot_to_sun(slot));
@@ -204,7 +205,7 @@ static int ibm_set_attention_status(struct hotplug_slot *slot, u8 status)
                err("APLS evaluation failed:  0x%08x\n", stat);
                return -ENODEV;
        } else if (!rc) {
-               err("APLS method failed:  0x%08lx\n", rc);
+               err("APLS method failed:  0x%08llx\n", rc);
                return -ERANGE;
        }
        return 0;
@@ -271,7 +272,7 @@ static void ibm_handle_events(acpi_handle handle, u32 event, void *context)
                dbg("%s: generationg bus event\n", __func__);
                acpi_bus_generate_proc_event(note->device, note->event, detail);
                acpi_bus_generate_netlink_event(note->device->pnp.device_class,
-                                                 note->device->dev.bus_id,
+                                                 dev_name(&note->device->dev),
                                                  note->event, detail);
        } else
                note->event = event;
@@ -398,23 +399,20 @@ static acpi_status __init ibm_find_acpi_device(acpi_handle handle,
        acpi_handle *phandle = (acpi_handle *)context;
        acpi_status status; 
        struct acpi_device_info *info;
-       struct acpi_buffer info_buffer = { ACPI_ALLOCATE_BUFFER, NULL };
        int retval = 0;
 
-       status = acpi_get_object_info(handle, &info_buffer);
+       status = acpi_get_object_info(handle, &info);
        if (ACPI_FAILURE(status)) {
                err("%s:  Failed to get device information status=0x%x\n",
                        __func__, status);
                return retval;
        }
-       info = info_buffer.pointer;
-       info->hardware_id.value[sizeof(info->hardware_id.value) - 1] = '\0';
 
        if (info->current_status && (info->valid & ACPI_VALID_HID) &&
-                       (!strcmp(info->hardware_id.value, IBM_HARDWARE_ID1) ||
-                        !strcmp(info->hardware_id.value, IBM_HARDWARE_ID2))) {
+                       (!strcmp(info->hardware_id.string, IBM_HARDWARE_ID1) ||
+                        !strcmp(info->hardware_id.string, IBM_HARDWARE_ID2))) {
                dbg("found hardware: %s, handle: %p\n",
-                       info->hardware_id.value, handle);
+                       info->hardware_id.string, handle);
                *phandle = handle;
                /* returning non-zero causes the search to stop
                 * and returns this value to the caller of 
@@ -437,7 +435,7 @@ static int __init ibm_acpiphp_init(void)
        dbg("%s\n", __func__);
 
        if (acpi_walk_namespace(ACPI_TYPE_DEVICE, ACPI_ROOT_OBJECT,
-                       ACPI_UINT32_MAX, ibm_find_acpi_device,
+                       ACPI_UINT32_MAX, ibm_find_acpi_device, NULL,
                        &ibm_acpi_handle, NULL) != FOUND_APCI) {
                err("%s: acpi_walk_namespace failed\n", __func__);
                retval = -ENODEV;