]> err.no Git - linux-2.6/blobdiff - arch/arm/mach-iop3xx/iq80321-pci.c
[ARM] Convert kmalloc+memset to kzalloc
[linux-2.6] / arch / arm / mach-iop3xx / iq80321-pci.c
index 79fea3d20b66d53b0072543267e998845ef39493..d9758d3f6e7f14dd2dc9bd0e33d53277fa7f5d0f 100644 (file)
@@ -14,6 +14,8 @@
 #include <linux/kernel.h>
 #include <linux/pci.h>
 #include <linux/init.h>
+#include <linux/string.h>
+#include <linux/slab.h>
 
 #include <asm/hardware.h>
 #include <asm/irq.h>
@@ -66,12 +68,10 @@ static int iq80321_setup(int nr, struct pci_sys_data *sys)
        if(nr != 0)
                return 0;
 
-       res = kmalloc(sizeof(struct resource) * 2, GFP_KERNEL);
+       res = kzalloc(sizeof(struct resource) * 2, GFP_KERNEL);
        if (!res)
                panic("PCI: unable to alloc resources");
 
-       memset(res, 0, sizeof(struct resource) * 2);
-
        res[0].start = IOP321_PCI_LOWER_IO_VA;
        res[0].end   = IOP321_PCI_UPPER_IO_VA;
        res[0].name  = "IQ80321 PCI I/O Space";