aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/i2c/i2c-dev.c
diff options
context:
space:
mode:
authorDeepak Saxena <dsaxena@plexity.net>2005-10-17 17:09:43 -0400
committerGreg Kroah-Hartman <gregkh@suse.de>2005-10-28 17:02:12 -0400
commit5263ebb51eb098b01caf229498c954999117e4a7 (patch)
treef18933c0b38a51ba9f100e7be4f5f5d54838cf45 /drivers/i2c/i2c-dev.c
parentba9c2e8d15da029ea3051c95e446b2d638ef02e2 (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/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 89f54a5e8484..276ec42a0717 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)
80{ 80{
81 struct i2c_dev *i2c_dev; 81 struct i2c_dev *i2c_dev;
82 82
83 i2c_dev = kmalloc(sizeof(*i2c_dev), GFP_KERNEL); 83 i2c_dev = kzalloc(sizeof(*i2c_dev), GFP_KERNEL);
84 if (!i2c_dev) 84 if (!i2c_dev)
85 return ERR_PTR(-ENOMEM); 85 return ERR_PTR(-ENOMEM);
86 memset(i2c_dev, 0x00, sizeof(*i2c_dev));
87 86
88 spin_lock(&i2c_dev_array_lock); 87 spin_lock(&i2c_dev_array_lock);
89 if (i2c_dev_array[adap->nr]) { 88 if (i2c_dev_array[adap->nr]) {