[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>
This commit is contained in:
Deepak Saxena
2005-10-17 23:09:43 +02:00
committed by Greg Kroah-Hartman
parent ba9c2e8d15
commit 5263ebb51e
22 changed files with 25 additions and 52 deletions

View File

@ -193,11 +193,10 @@ static int ds1374_probe(struct i2c_adapter *adap, int addr, int kind)
struct i2c_client *client;
int rc;
client = kmalloc(sizeof(struct i2c_client), GFP_KERNEL);
client = kzalloc(sizeof(struct i2c_client), GFP_KERNEL);
if (!client)
return -ENOMEM;
memset(client, 0, sizeof(struct i2c_client));
strncpy(client->name, DS1374_DRV_NAME, I2C_NAME_SIZE);
client->addr = addr;
client->adapter = adap;