diff options
author | Linus Torvalds <torvalds@g5.osdl.org> | 2006-03-23 18:49:57 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2006-03-23 18:49:57 -0500 |
commit | a3ea9b584ed2acdeae817f0dc91a5880e0828a05 (patch) | |
tree | 5b4ef9b10c05aa84419a6ba6187d0dcd14654c97 /drivers/pci/hotplug/fakephp.c | |
parent | 554f593d6c411e717a71ffdcb0cfb46bb2394502 (diff) | |
parent | b2e6e3ba7deb525f180df64f32f3fcb214538bea (diff) |
Merge master.kernel.org:/pub/scm/linux/kernel/git/gregkh/pci-2.6
* master.kernel.org:/pub/scm/linux/kernel/git/gregkh/pci-2.6: (49 commits)
[PATCH] acpiphp: fix acpi_path_name
[PATCH] ibmphp: remove TRUE and FALSE
[PATCH] PCI Hotplug: add common acpi functions to core
[PATCH] PCI: kzalloc() conversion in drivers/pci
[PATCH] acpiphp: Scan slots under the nested P2P bridge
[PATCH] PCI Hotplug: SN: Fix cleanup on hotplug removal of PPB
[PATCH] shpchp: cleanup bus speed handling
[PATCH] PCI: fix pci_request_region[s] arg
[PATCH] PCI: Provide a boot parameter to disable MSI
[PATCH] PCI: the scheduled removal of PCI_LEGACY_PROC
[PATCH] PCI: cpqphp_ctrl.c: board_replaced(): remove dead code
[PATCH] acpiphp: fix bridge handle
[PATCH] acpiphp - slot management fix - V4
[PATCH] acpi: remove dock event handling from ibm_acpi
[PATCH] acpiphp: add dock event handling
[PATCH] acpi: export acpi_bus_trim
[PATCH] acpiphp: add new bus to acpi
[PATCH] PCI: Move pci_dev_put outside a spinlock
[PATCH] PCI: PCI/Cardbus cards hidden, needs pci=assign-busses to fix
[PATCH] PCI: fix problems with MSI-X on ia64
...
Diffstat (limited to 'drivers/pci/hotplug/fakephp.c')
-rw-r--r-- | drivers/pci/hotplug/fakephp.c | 9 |
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) | |||
95 | struct hotplug_slot *slot; | 95 | struct hotplug_slot *slot; |
96 | int retval = -ENOMEM; | 96 | int retval = -ENOMEM; |
97 | 97 | ||
98 | slot = kmalloc(sizeof(struct hotplug_slot), GFP_KERNEL); | 98 | slot = kzalloc(sizeof(struct hotplug_slot), GFP_KERNEL); |
99 | if (!slot) | 99 | if (!slot) |
100 | goto error; | 100 | goto error; |
101 | memset(slot, 0, sizeof(*slot)); | ||
102 | 101 | ||
103 | slot->info = kmalloc(sizeof(struct hotplug_slot_info), GFP_KERNEL); | 102 | slot->info = kzalloc(sizeof(struct hotplug_slot_info), GFP_KERNEL); |
104 | if (!slot->info) | 103 | if (!slot->info) |
105 | goto error_slot; | 104 | goto error_slot; |
106 | memset(slot->info, 0, sizeof(struct hotplug_slot_info)); | ||
107 | 105 | ||
108 | slot->info->power_status = 1; | 106 | slot->info->power_status = 1; |
109 | slot->info->max_bus_speed = PCI_SPEED_UNKNOWN; | 107 | slot->info->max_bus_speed = PCI_SPEED_UNKNOWN; |
@@ -227,11 +225,10 @@ static void pci_rescan_bus(const struct pci_bus *bus) | |||
227 | { | 225 | { |
228 | unsigned int devfn; | 226 | unsigned int devfn; |
229 | struct pci_dev *dev; | 227 | struct pci_dev *dev; |
230 | dev = kmalloc(sizeof(struct pci_dev), GFP_KERNEL); | 228 | dev = kzalloc(sizeof(struct pci_dev), GFP_KERNEL); |
231 | if (!dev) | 229 | if (!dev) |
232 | return; | 230 | return; |
233 | 231 | ||
234 | memset(dev, 0, sizeof(dev)); | ||
235 | dev->bus = (struct pci_bus*)bus; | 232 | dev->bus = (struct pci_bus*)bus; |
236 | dev->sysdata = bus->sysdata; | 233 | dev->sysdata = bus->sysdata; |
237 | for (devfn = 0; devfn < 0x100; devfn += 8) { | 234 | for (devfn = 0; devfn < 0x100; devfn += 8) { |