diff options
author | Deepak Saxena <dsaxena@plexity.net> | 2005-10-17 17:09:43 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2005-10-28 17:02:12 -0400 |
commit | 5263ebb51eb098b01caf229498c954999117e4a7 (patch) | |
tree | f18933c0b38a51ba9f100e7be4f5f5d54838cf45 /drivers/i2c/busses/i2c-ibm_iic.c | |
parent | ba9c2e8d15da029ea3051c95e446b2d638ef02e2 (diff) |
[PATCH] i2c: kzalloc conversion, other drivers
Use kzalloc instead of kmalloc+memset in all remaining i2c bus and
chip drivers.
Signed-off-by: Deepak Saxena <dsaxena@plexity.net>
Signed-off-by: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/i2c/busses/i2c-ibm_iic.c')
-rw-r--r-- | drivers/i2c/busses/i2c-ibm_iic.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/i2c/busses/i2c-ibm_iic.c b/drivers/i2c/busses/i2c-ibm_iic.c index a3ed9590f028..1a587253d716 100644 --- a/drivers/i2c/busses/i2c-ibm_iic.c +++ b/drivers/i2c/busses/i2c-ibm_iic.c | |||
@@ -672,13 +672,12 @@ static int __devinit iic_probe(struct ocp_device *ocp){ | |||
672 | printk(KERN_WARNING"ibm-iic%d: missing additional data!\n", | 672 | printk(KERN_WARNING"ibm-iic%d: missing additional data!\n", |
673 | ocp->def->index); | 673 | ocp->def->index); |
674 | 674 | ||
675 | if (!(dev = kmalloc(sizeof(*dev), GFP_KERNEL))){ | 675 | if (!(dev = kzalloc(sizeof(*dev), GFP_KERNEL))) { |
676 | printk(KERN_CRIT "ibm-iic%d: failed to allocate device data\n", | 676 | printk(KERN_CRIT "ibm-iic%d: failed to allocate device data\n", |
677 | ocp->def->index); | 677 | ocp->def->index); |
678 | return -ENOMEM; | 678 | return -ENOMEM; |
679 | } | 679 | } |
680 | 680 | ||
681 | memset(dev, 0, sizeof(*dev)); | ||
682 | dev->idx = ocp->def->index; | 681 | dev->idx = ocp->def->index; |
683 | ocp_set_drvdata(ocp, dev); | 682 | ocp_set_drvdata(ocp, dev); |
684 | 683 | ||