]> err.no Git - linux-2.6/commitdiff
[PATCH] PCI Hotplug: don't use acpi_os_free
authorKristen Accardi <kristen.c.accardi@intel.com>
Tue, 18 Apr 2006 21:36:43 +0000 (14:36 -0700)
committerGreg Kroah-Hartman <gregkh@suse.de>
Mon, 19 Jun 2006 21:13:22 +0000 (14:13 -0700)
acpi_os_free should not be used by drivers outside
of acpi/*/*.c.  Replace with kfree().

Signed-off-by: Kristen Carlson Accardi <kristen.c.accardi@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/pci/hotplug/acpi_pcihp.c
drivers/pci/hotplug/acpiphp_glue.c
drivers/pci/hotplug/pciehp_hpc.c

index 39af9c325f3532e37013d53a6fbf0412bc482d63..64cb30d7fc9a9b1259e3c6b342ebf268a2476268 100644 (file)
@@ -58,7 +58,7 @@ acpi_run_hpp(acpi_handle handle, struct hotplug_params *hpp)
                if (!ret_buf.pointer) {
                        printk(KERN_ERR "%s:%s alloc for _HPP fail\n",
                                __FUNCTION__, (char *)string.pointer);
-                       acpi_os_free(string.pointer);
+                       kfree(string.pointer);
                        return AE_NO_MEMORY;
                }
                status = acpi_evaluate_object(handle, METHOD_NAME__HPP,
@@ -69,7 +69,7 @@ acpi_run_hpp(acpi_handle handle, struct hotplug_params *hpp)
                if (ACPI_FAILURE(status)) {
                        pr_debug("%s:%s _HPP fail=0x%x\n", __FUNCTION__,
                                (char *)string.pointer, status);
-                       acpi_os_free(string.pointer);
+                       kfree(string.pointer);
                        return status;
                }
        }
@@ -109,8 +109,8 @@ acpi_run_hpp(acpi_handle handle, struct hotplug_params *hpp)
        pr_debug("  _HPP: enable PERR    =0x%x\n", hpp->enable_perr);
 
 free_and_return:
-       acpi_os_free(string.pointer);
-       acpi_os_free(ret_buf.pointer);
+       kfree(string.pointer);
+       kfree(ret_buf.pointer);
        return status;
 }
 
@@ -136,7 +136,7 @@ acpi_status acpi_run_oshp(acpi_handle handle)
                pr_debug("%s:%s OSHP passes\n", __FUNCTION__,
                        (char *)string.pointer);
 
-       acpi_os_free(string.pointer);
+       kfree(string.pointer);
        return status;
 }
 EXPORT_SYMBOL_GPL(acpi_run_oshp);
@@ -192,19 +192,19 @@ int acpi_root_bridge(acpi_handle handle)
                if ((info->valid & ACPI_VALID_HID) &&
                        !strcmp(PCI_ROOT_HID_STRING,
                                        info->hardware_id.value)) {
-                       acpi_os_free(buffer.pointer);
+                       kfree(buffer.pointer);
                        return 1;
                }
                if (info->valid & ACPI_VALID_CID) {
                        for (i=0; i < info->compatibility_id.count; i++) {
                                if (!strcmp(PCI_ROOT_HID_STRING,
                                        info->compatibility_id.id[i].value)) {
-                                       acpi_os_free(buffer.pointer);
+                                       kfree(buffer.pointer);
                                        return 1;
                                }
                        }
                }
-               acpi_os_free(buffer.pointer);
+               kfree(buffer.pointer);
        }
        return 0;
 }
index 610a530232ffbe7e5d94b0cde7b49857b07fb748..2a83e6bdab6a17ffd478e051da7d15d4cd2327a5 100644 (file)
@@ -715,7 +715,7 @@ static int get_gsi_base(acpi_handle handle, u32 *gsi_base)
                break;
        }
  out:
-       acpi_os_free(buffer.pointer);
+       kfree(buffer.pointer);
        return result;
 }
 
index 6c14d9e46b2e1f1a911191e3e7e40df61aa9d841..7f459dfeadd3bb50c8768f448a91027f96042f97 100644 (file)
@@ -1288,7 +1288,7 @@ int pciehp_acpi_get_hp_hw_control_from_firmware(struct pci_dev *dev)
                if (ACPI_SUCCESS(status)) {
                        dbg("Gained control for hotplug HW for pci %s (%s)\n",
                                pci_name(dev), (char *)string.pointer);
-                       acpi_os_free(string.pointer);
+                       kfree(string.pointer);
                        return 0;
                }
                if (acpi_root_bridge(handle))
@@ -1302,7 +1302,7 @@ int pciehp_acpi_get_hp_hw_control_from_firmware(struct pci_dev *dev)
        err("Cannot get control of hotplug hardware for pci %s\n",
                        pci_name(dev));
 
-       acpi_os_free(string.pointer);
+       kfree(string.pointer);
        return -1;
 }
 #endif