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/rtc8564.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/rtc8564.c')
-rw-r--r-- | drivers/i2c/chips/rtc8564.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/i2c/chips/rtc8564.c b/drivers/i2c/chips/rtc8564.c index dd9d42d7b6e7..916cdc1af23c 100644 --- a/drivers/i2c/chips/rtc8564.c +++ b/drivers/i2c/chips/rtc8564.c | |||
@@ -148,12 +148,11 @@ static int rtc8564_attach(struct i2c_adapter *adap, int addr, int kind) | |||
148 | {addr, I2C_M_RD, 2, data} | 148 | {addr, I2C_M_RD, 2, data} |
149 | }; | 149 | }; |
150 | 150 | ||
151 | d = kmalloc(sizeof(struct rtc8564_data), GFP_KERNEL); | 151 | d = kzalloc(sizeof(struct rtc8564_data), GFP_KERNEL); |
152 | if (!d) { | 152 | if (!d) { |
153 | ret = -ENOMEM; | 153 | ret = -ENOMEM; |
154 | goto done; | 154 | goto done; |
155 | } | 155 | } |
156 | memset(d, 0, sizeof(struct rtc8564_data)); | ||
157 | new_client = &d->client; | 156 | new_client = &d->client; |
158 | 157 | ||
159 | strlcpy(new_client->name, "RTC8564", I2C_NAME_SIZE); | 158 | strlcpy(new_client->name, "RTC8564", I2C_NAME_SIZE); |