* [PATCH] [I2C] kmalloc + memzero -> kzalloc conversion
@ 2005-10-01 5:02 Deepak Saxena
0 siblings, 0 replies; only message in thread
From: Deepak Saxena @ 2005-10-01 5:02 UTC (permalink / raw)
To: Linus Torvalds; +Cc: linux-kernel, lm-sensors
Signed-off-by: Deepak Saxena <dsaxena@mvista.com>
diff --git a/drivers/i2c/busses/i2c-ixp2000.c b/drivers/i2c/busses/i2c-ixp2000.c
--- a/drivers/i2c/busses/i2c-ixp2000.c
+++ b/drivers/i2c/busses/i2c-ixp2000.c
@@ -104,11 +104,10 @@ static int ixp2000_i2c_probe(struct devi
struct platform_device *plat_dev = to_platform_device(dev);
struct ixp2000_i2c_pins *gpio = plat_dev->dev.platform_data;
struct ixp2000_i2c_data *drv_data =
- kmalloc(sizeof(struct ixp2000_i2c_data), GFP_KERNEL);
+ kzalloc(sizeof(struct ixp2000_i2c_data), GFP_KERNEL);
if (!drv_data)
return -ENOMEM;
- memzero(drv_data, sizeof(*drv_data));
drv_data->gpio_pins = gpio;
drv_data->algo_data.data = gpio;
diff --git a/drivers/i2c/busses/i2c-ixp4xx.c b/drivers/i2c/busses/i2c-ixp4xx.c
--- a/drivers/i2c/busses/i2c-ixp4xx.c
+++ b/drivers/i2c/busses/i2c-ixp4xx.c
@@ -105,12 +105,11 @@ static int ixp4xx_i2c_probe(struct devic
struct platform_device *plat_dev = to_platform_device(dev);
struct ixp4xx_i2c_pins *gpio = plat_dev->dev.platform_data;
struct ixp4xx_i2c_data *drv_data =
- kmalloc(sizeof(struct ixp4xx_i2c_data), GFP_KERNEL);
+ kzalloc(sizeof(struct ixp4xx_i2c_data), GFP_KERNEL);
if(!drv_data)
return -ENOMEM;
- memzero(drv_data, sizeof(struct ixp4xx_i2c_data));
drv_data->gpio_pins = gpio;
/*
--
Deepak Saxena - dsaxena@plexity.net - http://www.plexity.net
Even a stopped clock gives the right time twice a day.
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2005-10-01 5:02 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-10-01 5:02 [PATCH] [I2C] kmalloc + memzero -> kzalloc conversion Deepak Saxena
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox