]> err.no Git - linux-2.6/commitdiff
[PATCH] i2c: kzalloc conversion, ixp bus drivers
authorDeepak Saxena <dsaxena@plexity.net>
Mon, 17 Oct 2005 21:07:05 +0000 (23:07 +0200)
committerGreg Kroah-Hartman <gregkh@suse.de>
Fri, 28 Oct 2005 21:02:12 +0000 (14:02 -0700)
Use kzalloc instead of kmalloc+memzero in the ixp2000 and ixp4xx
I2C bus drivers.

Signed-off-by: Deepak Saxena <dsaxena@mvista.com>
Signed-off-by: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/i2c/busses/i2c-ixp2000.c
drivers/i2c/busses/i2c-ixp4xx.c

index c3292dc743f1e239d28458825854b19e0b9ea706..42016ee6ef133908f98549199c41a8f6d93f6096 100644 (file)
@@ -106,11 +106,10 @@ static int ixp2000_i2c_probe(struct device *dev)
        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;
index 3169280c25a6cc95bd9ea18406e8c47fd461d4e2..69303ab65e0488d91799bb509ce95c10e6ae803a 100644 (file)
@@ -107,12 +107,11 @@ static int ixp4xx_i2c_probe(struct device *dev)
        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;
 
        /*