summaryrefslogtreecommitdiffstats
path: root/drivers/i2c/i2c-dev.c
diff options
context:
space:
mode:
authorDeepak Saxena <dsaxena@plexity.net>2005-10-17 23:09:43 +0200
committerGreg Kroah-Hartman <gregkh@suse.de>2005-10-28 14:02:12 -0700
commit5263ebb51eb098b01caf229498c954999117e4a7 (patch)
treef18933c0b38a51ba9f100e7be4f5f5d54838cf45 /drivers/i2c/i2c-dev.c
parentba9c2e8d15da029ea3051c95e446b2d638ef02e2 (diff)
downloadop-kernel-dev-5263ebb51eb098b01caf229498c954999117e4a7.zip
op-kernel-dev-5263ebb51eb098b01caf229498c954999117e4a7.tar.gz
[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/i2c-dev.c')
-rw-r--r--drivers/i2c/i2c-dev.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/i2c/i2c-dev.c b/drivers/i2c/i2c-dev.c
index 89f54a5..276ec42 100644
--- a/drivers/i2c/i2c-dev.c
+++ b/drivers/i2c/i2c-dev.c
@@ -80,10 +80,9 @@ static struct i2c_dev *get_free_i2c_dev(struct i2c_adapter *adap)
{
struct i2c_dev *i2c_dev;
- i2c_dev = kmalloc(sizeof(*i2c_dev), GFP_KERNEL);
+ i2c_dev = kzalloc(sizeof(*i2c_dev), GFP_KERNEL);
if (!i2c_dev)
return ERR_PTR(-ENOMEM);
- memset(i2c_dev, 0x00, sizeof(*i2c_dev));
spin_lock(&i2c_dev_array_lock);
if (i2c_dev_array[adap->nr]) {
OpenPOWER on IntegriCloud