]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - drivers/acpi/pci_irq.c
ARM: OMAP: 243x: Add mappings for SDRC and SMS
[linux-2.6-omap-h63xx.git] / drivers / acpi / pci_irq.c
index fb96e3bf969bbedba937d0c948c1c4c47f499a41..dd3186abe07a9c464df616aae6fb05454fb53085 100644 (file)
@@ -24,7 +24,6 @@
  * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  */
 
-#include <linux/config.h>
 
 #include <linux/kernel.h>
 #include <linux/module.h>
@@ -39,7 +38,7 @@
 #include <acpi/acpi_drivers.h>
 
 #define _COMPONENT             ACPI_PCI_COMPONENT
-ACPI_MODULE_NAME("pci_irq")
+ACPI_MODULE_NAME("pci_irq");
 
 static struct acpi_prt_list acpi_prt;
 static DEFINE_SPINLOCK(acpi_prt_lock);
@@ -90,10 +89,9 @@ acpi_pci_irq_add_entry(acpi_handle handle,
        if (!prt)
                return -EINVAL;
 
-       entry = kmalloc(sizeof(struct acpi_prt_entry), GFP_KERNEL);
+       entry = kzalloc(sizeof(struct acpi_prt_entry), GFP_KERNEL);
        if (!entry)
                return -ENOMEM;
-       memset(entry, 0, sizeof(struct acpi_prt_entry));
 
        entry->id.segment = segment;
        entry->id.bus = bus;
@@ -162,10 +160,9 @@ int acpi_pci_irq_add_prt(acpi_handle handle, int segment, int bus)
        static int first_time = 1;
 
 
-       pathname = (char *)kmalloc(ACPI_PATHNAME_MAX, GFP_KERNEL);
+       pathname = kzalloc(ACPI_PATHNAME_MAX, GFP_KERNEL);
        if (!pathname)
                return -ENOMEM;
-       memset(pathname, 0, ACPI_PATHNAME_MAX);
 
        if (first_time) {
                acpi_prt.count = 0;
@@ -199,11 +196,10 @@ int acpi_pci_irq_add_prt(acpi_handle handle, int segment, int bus)
                return -ENODEV;
        }
 
-       prt = kmalloc(buffer.length, GFP_KERNEL);
+       prt = kzalloc(buffer.length, GFP_KERNEL);
        if (!prt) {
                return -ENOMEM;
        }
-       memset(prt, 0, buffer.length);
        buffer.pointer = prt;
 
        status = acpi_get_irq_routing_table(handle, &buffer);