diff options
author | Pekka Enberg <penberg@cs.helsinki.fi> | 2005-09-22 03:48:11 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2005-09-22 10:58:24 -0400 |
commit | 656da9da3745abcbbbdca598745d04c6de2c8843 (patch) | |
tree | f18072653649eb5bae6823a2d5ec22d62e60462b /drivers | |
parent | 1029d6b58adc3225911c56af26895871dd2ea8cf (diff) |
[PATCH] PCI: convert kcalloc to kzalloc
This patch converts kcalloc(1, ...) calls to use the new kzalloc() function.
Signed-off-by: Pekka Enberg <penberg@cs.helsinki.fi>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/pci/hotplug/sgi_hotplug.c | 6 | ||||
-rw-r--r-- | drivers/pci/pci-sysfs.c | 2 |
2 files changed, 4 insertions, 4 deletions
diff --git a/drivers/pci/hotplug/sgi_hotplug.c b/drivers/pci/hotplug/sgi_hotplug.c index b1409441c1cd..a32ae82e5922 100644 --- a/drivers/pci/hotplug/sgi_hotplug.c +++ b/drivers/pci/hotplug/sgi_hotplug.c | |||
@@ -159,7 +159,7 @@ static int sn_hp_slot_private_alloc(struct hotplug_slot *bss_hotplug_slot, | |||
159 | 159 | ||
160 | pcibus_info = SN_PCIBUS_BUSSOFT_INFO(pci_bus); | 160 | pcibus_info = SN_PCIBUS_BUSSOFT_INFO(pci_bus); |
161 | 161 | ||
162 | slot = kcalloc(1, sizeof(*slot), GFP_KERNEL); | 162 | slot = kzalloc(sizeof(*slot), GFP_KERNEL); |
163 | if (!slot) | 163 | if (!slot) |
164 | return -ENOMEM; | 164 | return -ENOMEM; |
165 | bss_hotplug_slot->private = slot; | 165 | bss_hotplug_slot->private = slot; |
@@ -491,7 +491,7 @@ static int sn_hotplug_slot_register(struct pci_bus *pci_bus) | |||
491 | if (sn_pci_slot_valid(pci_bus, device) != 1) | 491 | if (sn_pci_slot_valid(pci_bus, device) != 1) |
492 | continue; | 492 | continue; |
493 | 493 | ||
494 | bss_hotplug_slot = kcalloc(1, sizeof(*bss_hotplug_slot), | 494 | bss_hotplug_slot = kzalloc(sizeof(*bss_hotplug_slot), |
495 | GFP_KERNEL); | 495 | GFP_KERNEL); |
496 | if (!bss_hotplug_slot) { | 496 | if (!bss_hotplug_slot) { |
497 | rc = -ENOMEM; | 497 | rc = -ENOMEM; |
@@ -499,7 +499,7 @@ static int sn_hotplug_slot_register(struct pci_bus *pci_bus) | |||
499 | } | 499 | } |
500 | 500 | ||
501 | bss_hotplug_slot->info = | 501 | bss_hotplug_slot->info = |
502 | kcalloc(1, sizeof(struct hotplug_slot_info), | 502 | kzalloc(sizeof(struct hotplug_slot_info), |
503 | GFP_KERNEL); | 503 | GFP_KERNEL); |
504 | if (!bss_hotplug_slot->info) { | 504 | if (!bss_hotplug_slot->info) { |
505 | rc = -ENOMEM; | 505 | rc = -ENOMEM; |
diff --git a/drivers/pci/pci-sysfs.c b/drivers/pci/pci-sysfs.c index 56a3b397efee..2898830c496f 100644 --- a/drivers/pci/pci-sysfs.c +++ b/drivers/pci/pci-sysfs.c | |||
@@ -360,7 +360,7 @@ pci_create_resource_files(struct pci_dev *pdev) | |||
360 | continue; | 360 | continue; |
361 | 361 | ||
362 | /* allocate attribute structure, piggyback attribute name */ | 362 | /* allocate attribute structure, piggyback attribute name */ |
363 | res_attr = kcalloc(1, sizeof(*res_attr) + 10, GFP_ATOMIC); | 363 | res_attr = kzalloc(sizeof(*res_attr) + 10, GFP_ATOMIC); |
364 | if (res_attr) { | 364 | if (res_attr) { |
365 | char *res_attr_name = (char *)(res_attr + 1); | 365 | char *res_attr_name = (char *)(res_attr + 1); |
366 | 366 | ||