summaryrefslogtreecommitdiffstats
path: root/arch/arm/common/sa1111.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/sa1111.c
parent18ec5c731271939acb414614e964c15c8ef52156 (diff)
downloadop-kernel-dev-d2a02b93cf78205dd23226efb66481569900976e.zip
op-kernel-dev-d2a02b93cf78205dd23226efb66481569900976e.tar.gz
[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/sa1111.c')
-rw-r--r--arch/arm/common/sa1111.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/arch/arm/common/sa1111.c b/arch/arm/common/sa1111.c
index 5ba1ee0..3f68db8 100644
--- a/arch/arm/common/sa1111.c
+++ b/arch/arm/common/sa1111.c
@@ -541,12 +541,11 @@ sa1111_init_one_child(struct sa1111 *sachip, struct resource *parent,
struct sa1111_dev *dev;
int ret;
- dev = kmalloc(sizeof(struct sa1111_dev), GFP_KERNEL);
+ dev = kzalloc(sizeof(struct sa1111_dev), GFP_KERNEL);
if (!dev) {
ret = -ENOMEM;
goto out;
}
- memset(dev, 0, sizeof(struct sa1111_dev));
snprintf(dev->dev.bus_id, sizeof(dev->dev.bus_id),
"%4.4lx", info->offset);
@@ -621,12 +620,10 @@ __sa1111_probe(struct device *me, struct resource *mem, int irq)
unsigned int has_devs, val;
int i, ret = -ENODEV;
- sachip = kmalloc(sizeof(struct sa1111), GFP_KERNEL);
+ sachip = kzalloc(sizeof(struct sa1111), GFP_KERNEL);
if (!sachip)
return -ENOMEM;
- memset(sachip, 0, sizeof(struct sa1111));
-
sachip->clk = clk_get(me, "GPIO27_CLK");
if (!sachip->clk) {
ret = PTR_ERR(sachip->clk);
OpenPOWER on IntegriCloud