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/busses/i2c-parport.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/busses/i2c-parport.c')
-rw-r--r-- | drivers/i2c/busses/i2c-parport.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/drivers/i2c/busses/i2c-parport.c b/drivers/i2c/busses/i2c-parport.c index fa506187fbe1..2854d858fc9b 100644 --- a/drivers/i2c/busses/i2c-parport.c +++ b/drivers/i2c/busses/i2c-parport.c | |||
@@ -155,12 +155,11 @@ static void i2c_parport_attach (struct parport *port) | |||
155 | { | 155 | { |
156 | struct i2c_par *adapter; | 156 | struct i2c_par *adapter; |
157 | 157 | ||
158 | adapter = kmalloc(sizeof(struct i2c_par), GFP_KERNEL); | 158 | adapter = kzalloc(sizeof(struct i2c_par), GFP_KERNEL); |
159 | if (adapter == NULL) { | 159 | if (adapter == NULL) { |
160 | printk(KERN_ERR "i2c-parport: Failed to kmalloc\n"); | 160 | printk(KERN_ERR "i2c-parport: Failed to kzalloc\n"); |
161 | return; | 161 | return; |
162 | } | 162 | } |
163 | memset(adapter, 0x00, sizeof(struct i2c_par)); | ||
164 | 163 | ||
165 | pr_debug("i2c-parport: attaching to %s\n", port->name); | 164 | pr_debug("i2c-parport: attaching to %s\n", port->name); |
166 | adapter->pdev = parport_register_device(port, "i2c-parport", | 165 | adapter->pdev = parport_register_device(port, "i2c-parport", |