summaryrefslogtreecommitdiffstats
path: root/arch/arm/common/locomo.c
diff options
context:
space:
mode:
authorRussell King <rmk@dyn-67.arm.linux.org.uk>2006-03-20 19:46:41 +0000
committerRussell King <rmk+kernel@arm.linux.org.uk>2006-03-21 22:06:17 +0000
commitd2a02b93cf78205dd23226efb66481569900976e (patch)
tree94760abdafe5cb72a41d3edd405a26d0c8e2e0d3 /arch/arm/common/locomo.c
parent18ec5c731271939acb414614e964c15c8ef52156 (diff)
[ARM] Convert kmalloc+memset to kzalloc
Convert all uses of kmalloc followed by memset to use kzalloc instead. Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Diffstat (limited to 'arch/arm/common/locomo.c')
-rw-r--r--arch/arm/common/locomo.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/arch/arm/common/locomo.c b/arch/arm/common/locomo.c
index 787e0d027f0..a7dc1370695 100644
--- a/arch/arm/common/locomo.c
+++ b/arch/arm/common/locomo.c
@@ -501,12 +501,11 @@ locomo_init_one_child(struct locomo *lchip, struct locomo_dev_info *info)
struct locomo_dev *dev;
int ret;
- dev = kmalloc(sizeof(struct locomo_dev), GFP_KERNEL);
+ dev = kzalloc(sizeof(struct locomo_dev), GFP_KERNEL);
if (!dev) {
ret = -ENOMEM;
goto out;
}
- memset(dev, 0, sizeof(struct locomo_dev));
strncpy(dev->dev.bus_id,info->name,sizeof(dev->dev.bus_id));
/*
@@ -664,12 +663,10 @@ __locomo_probe(struct device *me, struct resource *mem, int irq)
unsigned long r;
int i, ret = -ENODEV;
- lchip = kmalloc(sizeof(struct locomo), GFP_KERNEL);
+ lchip = kzalloc(sizeof(struct locomo), GFP_KERNEL);
if (!lchip)
return -ENOMEM;
- memset(lchip, 0, sizeof(struct locomo));
-
spin_lock_init(&lchip->lock);
lchip->dev = me;