aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/pci/hotplug/fakephp.c
diff options
context:
space:
mode:
authorEric Sesterhenn <snakebyte@gmx.de>2006-02-28 15:34:49 +0100
committerGreg Kroah-Hartman <gregkh@suse.de>2006-03-23 14:35:17 -0800
commitf5afe8064f3087bead8fea7e32547c2a3ada5fd0 (patch)
treede6a9d60aad6ee262c04290d73e414cd92b4ad5d /drivers/pci/hotplug/fakephp.c
parent[PATCH] acpiphp: Scan slots under the nested P2P bridge (diff)
downloadlinux-dev-f5afe8064f3087bead8fea7e32547c2a3ada5fd0.tar.xz
linux-dev-f5afe8064f3087bead8fea7e32547c2a3ada5fd0.zip
[PATCH] PCI: kzalloc() conversion in drivers/pci
this patch converts drivers/pci to kzalloc usage. Compile tested with allyes config. Signed-off-by: Eric Sesterhenn <snakebyte@gmx.de> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/pci/hotplug/fakephp.c')
-rw-r--r--drivers/pci/hotplug/fakephp.c9
1 files changed, 3 insertions, 6 deletions
diff --git a/drivers/pci/hotplug/fakephp.c b/drivers/pci/hotplug/fakephp.c
index 060d74775d7b..71b80c23e8ce 100644
--- a/drivers/pci/hotplug/fakephp.c
+++ b/drivers/pci/hotplug/fakephp.c
@@ -95,15 +95,13 @@ static int add_slot(struct pci_dev *dev)
struct hotplug_slot *slot;
int retval = -ENOMEM;
- slot = kmalloc(sizeof(struct hotplug_slot), GFP_KERNEL);
+ slot = kzalloc(sizeof(struct hotplug_slot), GFP_KERNEL);
if (!slot)
goto error;
- memset(slot, 0, sizeof(*slot));
- slot->info = kmalloc(sizeof(struct hotplug_slot_info), GFP_KERNEL);
+ slot->info = kzalloc(sizeof(struct hotplug_slot_info), GFP_KERNEL);
if (!slot->info)
goto error_slot;
- memset(slot->info, 0, sizeof(struct hotplug_slot_info));
slot->info->power_status = 1;
slot->info->max_bus_speed = PCI_SPEED_UNKNOWN;
@@ -227,11 +225,10 @@ static void pci_rescan_bus(const struct pci_bus *bus)
{
unsigned int devfn;
struct pci_dev *dev;
- dev = kmalloc(sizeof(struct pci_dev), GFP_KERNEL);
+ dev = kzalloc(sizeof(struct pci_dev), GFP_KERNEL);
if (!dev)
return;
- memset(dev, 0, sizeof(dev));
dev->bus = (struct pci_bus*)bus;
dev->sysdata = bus->sysdata;
for (devfn = 0; devfn < 0x100; devfn += 8) {