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/chips/eeprom.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/chips/eeprom.c')
-rw-r--r-- | drivers/i2c/chips/eeprom.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/i2c/chips/eeprom.c b/drivers/i2c/chips/eeprom.c index 7fb739c43935..ee7cbc823fd1 100644 --- a/drivers/i2c/chips/eeprom.c +++ b/drivers/i2c/chips/eeprom.c | |||
@@ -171,11 +171,10 @@ int eeprom_detect(struct i2c_adapter *adapter, int address, int kind) | |||
171 | | I2C_FUNC_SMBUS_BYTE)) | 171 | | I2C_FUNC_SMBUS_BYTE)) |
172 | goto exit; | 172 | goto exit; |
173 | 173 | ||
174 | if (!(data = kmalloc(sizeof(struct eeprom_data), GFP_KERNEL))) { | 174 | if (!(data = kzalloc(sizeof(struct eeprom_data), GFP_KERNEL))) { |
175 | err = -ENOMEM; | 175 | err = -ENOMEM; |
176 | goto exit; | 176 | goto exit; |
177 | } | 177 | } |
178 | memset(data, 0, sizeof(struct eeprom_data)); | ||
179 | 178 | ||
180 | new_client = &data->client; | 179 | new_client = &data->client; |
181 | memset(data->data, 0xff, EEPROM_SIZE); | 180 | memset(data->data, 0xff, EEPROM_SIZE); |