aboutsummaryrefslogtreecommitdiff
path: root/arch/arm/mach-integrator
diff options
context:
space:
mode:
Diffstat (limited to 'arch/arm/mach-integrator')
-rw-r--r--arch/arm/mach-integrator/impd1.c7
-rw-r--r--arch/arm/mach-integrator/integrator_ap.c4
2 files changed, 3 insertions, 8 deletions
diff --git a/arch/arm/mach-integrator/impd1.c b/arch/arm/mach-integrator/impd1.c
index a85d471c5bf..92d79fb3931 100644
--- a/arch/arm/mach-integrator/impd1.c
+++ b/arch/arm/mach-integrator/impd1.c
@@ -355,12 +355,11 @@ static int impd1_probe(struct lm_device *dev)
if (!request_mem_region(dev->resource.start, SZ_4K, "LM registers"))
return -EBUSY;
- impd1 = kmalloc(sizeof(struct impd1_module), GFP_KERNEL);
+ impd1 = kzalloc(sizeof(struct impd1_module), GFP_KERNEL);
if (!impd1) {
ret = -ENOMEM;
goto release_lm;
}
- memset(impd1, 0, sizeof(struct impd1_module));
impd1->base = ioremap(dev->resource.start, SZ_4K);
if (!impd1->base) {
@@ -389,12 +388,10 @@ static int impd1_probe(struct lm_device *dev)
pc_base = dev->resource.start + idev->offset;
- d = kmalloc(sizeof(struct amba_device), GFP_KERNEL);
+ d = kzalloc(sizeof(struct amba_device), GFP_KERNEL);
if (!d)
continue;
- memset(d, 0, sizeof(struct amba_device));
-
snprintf(d->dev.bus_id, sizeof(d->dev.bus_id),
"lm%x:%5.5lx", dev->id, idev->offset >> 12);
diff --git a/arch/arm/mach-integrator/integrator_ap.c b/arch/arm/mach-integrator/integrator_ap.c
index d8d3c2a5a97..6d65c96ebfd 100644
--- a/arch/arm/mach-integrator/integrator_ap.c
+++ b/arch/arm/mach-integrator/integrator_ap.c
@@ -319,12 +319,10 @@ static void __init ap_init(void)
if ((sc_dec & (16 << i)) == 0)
continue;
- lmdev = kmalloc(sizeof(struct lm_device), GFP_KERNEL);
+ lmdev = kzalloc(sizeof(struct lm_device), GFP_KERNEL);
if (!lmdev)
continue;
- memset(lmdev, 0, sizeof(struct lm_device));
-
lmdev->resource.start = 0xc0000000 + 0x10000000 * i;
lmdev->resource.end = lmdev->resource.start + 0x0fffffff;
lmdev->resource.flags = IORESOURCE_MEM;