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-amd8111.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-amd8111.c')
-rw-r--r-- | drivers/i2c/busses/i2c-amd8111.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/i2c/busses/i2c-amd8111.c b/drivers/i2c/busses/i2c-amd8111.c index 0d29e78dff63..aface7938a5b 100644 --- a/drivers/i2c/busses/i2c-amd8111.c +++ b/drivers/i2c/busses/i2c-amd8111.c | |||
@@ -344,10 +344,9 @@ static int __devinit amd8111_probe(struct pci_dev *dev, const struct pci_device_ | |||
344 | if (~pci_resource_flags(dev, 0) & IORESOURCE_IO) | 344 | if (~pci_resource_flags(dev, 0) & IORESOURCE_IO) |
345 | return -ENODEV; | 345 | return -ENODEV; |
346 | 346 | ||
347 | smbus = kmalloc(sizeof(struct amd_smbus), GFP_KERNEL); | 347 | smbus = kzalloc(sizeof(struct amd_smbus), GFP_KERNEL); |
348 | if (!smbus) | 348 | if (!smbus) |
349 | return -ENOMEM; | 349 | return -ENOMEM; |
350 | memset(smbus, 0, sizeof(struct amd_smbus)); | ||
351 | 350 | ||
352 | smbus->dev = dev; | 351 | smbus->dev = dev; |
353 | smbus->base = pci_resource_start(dev, 0); | 352 | smbus->base = pci_resource_start(dev, 0); |