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-prosavage.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-prosavage.c')
-rw-r--r-- | drivers/i2c/busses/i2c-prosavage.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/drivers/i2c/busses/i2c-prosavage.c b/drivers/i2c/busses/i2c-prosavage.c index 92b744273577..42f8b5ce3bf8 100644 --- a/drivers/i2c/busses/i2c-prosavage.c +++ b/drivers/i2c/busses/i2c-prosavage.c | |||
@@ -241,14 +241,12 @@ static int __devinit prosavage_probe(struct pci_dev *dev, const struct pci_devic | |||
241 | struct s_i2c_chip *chip; | 241 | struct s_i2c_chip *chip; |
242 | struct s_i2c_bus *bus; | 242 | struct s_i2c_bus *bus; |
243 | 243 | ||
244 | pci_set_drvdata(dev, kmalloc(sizeof(struct s_i2c_chip), GFP_KERNEL)); | 244 | pci_set_drvdata(dev, kzalloc(sizeof(struct s_i2c_chip), GFP_KERNEL)); |
245 | chip = (struct s_i2c_chip *)pci_get_drvdata(dev); | 245 | chip = (struct s_i2c_chip *)pci_get_drvdata(dev); |
246 | if (chip == NULL) { | 246 | if (chip == NULL) { |
247 | return -ENOMEM; | 247 | return -ENOMEM; |
248 | } | 248 | } |
249 | 249 | ||
250 | memset(chip, 0, sizeof(struct s_i2c_chip)); | ||
251 | |||
252 | base = dev->resource[0].start & PCI_BASE_ADDRESS_MEM_MASK; | 250 | base = dev->resource[0].start & PCI_BASE_ADDRESS_MEM_MASK; |
253 | len = dev->resource[0].end - base + 1; | 251 | len = dev->resource[0].end - base + 1; |
254 | chip->mmio = ioremap_nocache(base, len); | 252 | chip->mmio = ioremap_nocache(base, len); |