X-Git-Url: http://git.samba.org/samba.git/?p=sfrench%2Fcifs-2.6.git;a=blobdiff_plain;f=drivers%2Facpi%2Fscan.c;h=2e0fc8c3b58b88612bccdde575714a546e9b9798;hp=698a1540e3033ce1960d4c72a45f3a8177397d94;hb=7ac2735462349ca35d8807d93d66cf4d9ea7b729;hpb=db1a19b38f3a85f475b4ad716c71be133d8ca48e diff --git a/drivers/acpi/scan.c b/drivers/acpi/scan.c index 698a1540e303..2e0fc8c3b58b 100644 --- a/drivers/acpi/scan.c +++ b/drivers/acpi/scan.c @@ -888,49 +888,6 @@ static int acpi_device_set_context(struct acpi_device *device, int type) return result; } -static void acpi_device_get_debug_info(struct acpi_device *device, - acpi_handle handle, int type) -{ -#ifdef CONFIG_ACPI_DEBUG_OUTPUT - char *type_string = NULL; - char name[80] = { '?', '\0' }; - struct acpi_buffer buffer = { sizeof(name), name }; - - switch (type) { - case ACPI_BUS_TYPE_DEVICE: - type_string = "Device"; - acpi_get_name(handle, ACPI_FULL_PATHNAME, &buffer); - break; - case ACPI_BUS_TYPE_POWER: - type_string = "Power Resource"; - acpi_get_name(handle, ACPI_FULL_PATHNAME, &buffer); - break; - case ACPI_BUS_TYPE_PROCESSOR: - type_string = "Processor"; - acpi_get_name(handle, ACPI_FULL_PATHNAME, &buffer); - break; - case ACPI_BUS_TYPE_SYSTEM: - type_string = "System"; - acpi_get_name(handle, ACPI_FULL_PATHNAME, &buffer); - break; - case ACPI_BUS_TYPE_THERMAL: - type_string = "Thermal Zone"; - acpi_get_name(handle, ACPI_FULL_PATHNAME, &buffer); - break; - case ACPI_BUS_TYPE_POWER_BUTTON: - type_string = "Power Button"; - sprintf(name, "PWRB"); - break; - case ACPI_BUS_TYPE_SLEEP_BUTTON: - type_string = "Sleep Button"; - sprintf(name, "SLPB"); - break; - } - - printk(KERN_DEBUG "Found %s %s [%p]\n", type_string, name, handle); -#endif /*CONFIG_ACPI_DEBUG_OUTPUT */ -} - static int acpi_bus_remove(struct acpi_device *dev, int rmdevice) { int result = 0; @@ -984,12 +941,11 @@ acpi_add_single_object(struct acpi_device **child, if (!child) return -EINVAL; - device = kmalloc(sizeof(struct acpi_device), GFP_KERNEL); + device = kzalloc(sizeof(struct acpi_device), GFP_KERNEL); if (!device) { printk(KERN_ERR PREFIX "Memory allocation error\n"); return -ENOMEM; } - memset(device, 0, sizeof(struct acpi_device)); device->handle = handle; device->parent = parent; @@ -1077,8 +1033,6 @@ acpi_add_single_object(struct acpi_device **child, if ((result = acpi_device_set_context(device, type))) goto end; - acpi_device_get_debug_info(device, handle, type); - acpi_device_register(device, parent); /*