X-Git-Url: https://git.openpandora.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=drivers%2Facpi%2Fcontainer.c;h=0a1863ec91f3f78092d5c56c8bc2e59c0ed2961b;hb=88d5a7bb75b5e8f600e79b16abaf008c7fdfd27d;hp=7f7e41d40a3b77da042d6d414f3393ad13977968;hpb=0d1782144e81faf6203075c5fcd0a2f0db91af5b;p=pandora-kernel.git diff --git a/drivers/acpi/container.c b/drivers/acpi/container.c index 7f7e41d40a3b..0a1863ec91f3 100644 --- a/drivers/acpi/container.c +++ b/drivers/acpi/container.c @@ -96,11 +96,10 @@ static int acpi_container_add(struct acpi_device *device) return -EINVAL; } - container = kmalloc(sizeof(struct acpi_container), GFP_KERNEL); + container = kzalloc(sizeof(struct acpi_container), GFP_KERNEL); if (!container) return -ENOMEM; - memset(container, 0, sizeof(struct acpi_container)); container->handle = device->handle; strcpy(acpi_device_name(device), ACPI_CONTAINER_DEVICE_NAME); strcpy(acpi_device_class(device), ACPI_CONTAINER_CLASS); @@ -117,7 +116,7 @@ static int acpi_container_remove(struct acpi_device *device, int type) acpi_status status = AE_OK; struct acpi_container *pc = NULL; - pc = (struct acpi_container *)acpi_driver_data(device); + pc = acpi_driver_data(device); kfree(pc); return status; } @@ -236,7 +235,7 @@ container_walk_namespace_cb(acpi_handle handle, } end: - acpi_os_free(buffer.pointer); + kfree(buffer.pointer); return AE_OK; }