On Sat, 1 Apr 2006 22:38:09 -0500 "Brown, Len" <len.brown@xxxxxxxxx> wrote: > KAMEZAWA, > > please udpate to use kmalloc/kfree directly instead > of acpi_os_allocate/acpi_os_free. The later are > intended only for inside the core (and have already been > delted by another patch in the works:-) > > thanks, > -Len Hi, This is update. (against 2.6.16-mm2) BTW, For freeing buffer.pointer (returned by acpi_get_object_info etc.), should I also use kfree() ? -Kame === change acpi_os_alloc to kmalloc/kfree Signed-Off-By: KAMEZAWA Hiroyuki <kamezawa.hiroyu@xxxxxxxxxxxxxx> Index: linux-2.6.16-mm2/drivers/acpi/acpi_memhotplug.c =================================================================== --- linux-2.6.16-mm2.orig/drivers/acpi/acpi_memhotplug.c +++ linux-2.6.16-mm2/drivers/acpi/acpi_memhotplug.c @@ -108,11 +108,10 @@ acpi_memory_get_resource(struct acpi_res } } - new = acpi_os_allocate(sizeof(struct acpi_memory_info)); + new = kzalloc(sizeof(struct acpi_memory_info), GFP_KERNEL); if (!new) return AE_ERROR; - memset(new, 0, sizeof(*new)); INIT_LIST_HEAD(&new->list); new->caching = address64.info.mem.caching; new->write_protect = address64.info.mem.write_protect; @@ -136,7 +135,7 @@ acpi_memory_get_device_resources(struct acpi_memory_get_resource, mem_device); if (ACPI_FAILURE(status)) { list_for_each_entry_safe(info, n, &mem_device->res_list, list) - acpi_os_free(info); + kfree(info); return_VALUE(-EINVAL); } @@ -313,7 +312,7 @@ static int acpi_memory_disable_device(st if (result) return_VALUE(result); } - acpi_os_free(info); + kfree(info); } /* Power-off and eject the device */ - To unsubscribe from this list: send the line "unsubscribe linux-acpi" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html