kernel-ark/drivers/pci/hotplug
Rolf Eike Beer ac9e989187 PCI: Change memory allocation for acpiphp slots
Change memory allocation for acpiphp slots

Change the "struct slot" that acpiphp uses for managing it's slots to
directly contain the memory for the needed struct hotplug_slot_info and
the slot's name. This way we need only two memory allocations per slot
instead of four.

While we are at it: make_slot_name() is just a wrapper around snprintf()
knowing the right arguments to call it. Since the function makes just one
function call and is only called from one place I inlined it by hand.

Finally this fixes a possible bug waiting for someone to hit it. There were
two unused local variables in acpiphp_register_hotplug_slot(). gcc did not
find them because they were used in memory allocations with sizeof(*var).
They had the same types as the target of the allocation, but nevertheless
this was just weird.

Signed-off-by: Rolf Eike Beer <eike-hotplug@sf-tec.de>
Acked-by: Matthew Wilcox <matthew@wil.cx>
Signed-off-by: Kristen Carlson Accardi <kristen.c.accardi@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-12-01 14:36:59 -08:00
..
acpi_pcihp.c PCI Hotplug: move pci_hotplug.h to include/linux/ 2006-10-18 11:36:12 -07:00
acpiphp_core.c PCI: Change memory allocation for acpiphp slots 2006-12-01 14:36:59 -08:00
acpiphp_glue.c acpiphp: fix use of list_for_each macro 2006-12-01 14:36:58 -08:00
acpiphp_ibm.c PCI Hotplug: move pci_hotplug.h to include/linux/ 2006-10-18 11:36:12 -07:00
acpiphp.h PCI: Change memory allocation for acpiphp slots 2006-12-01 14:36:59 -08:00
cpci_hotplug_core.c PCI Hotplug: move pci_hotplug.h to include/linux/ 2006-10-18 11:36:12 -07:00
cpci_hotplug_pci.c PCI Hotplug: move pci_hotplug.h to include/linux/ 2006-10-18 11:36:12 -07:00
cpci_hotplug.h
cpcihp_generic.c
cpcihp_zt5550.c
cpcihp_zt5550.h
cpqphp_core.c PCI Hotplug: move pci_hotplug.h to include/linux/ 2006-10-18 11:36:12 -07:00
cpqphp_ctrl.c PCI Hotplug: move pci_hotplug.h to include/linux/ 2006-10-18 11:36:12 -07:00
cpqphp_nvram.c PCI Hotplug: move pci_hotplug.h to include/linux/ 2006-10-18 11:36:12 -07:00
cpqphp_nvram.h
cpqphp_pci.c PCI Hotplug: move pci_hotplug.h to include/linux/ 2006-10-18 11:36:12 -07:00
cpqphp_sysfs.c PCI Hotplug: move pci_hotplug.h to include/linux/ 2006-10-18 11:36:12 -07:00
cpqphp.h PCI Hotplug: move pci_hotplug.h to include/linux/ 2006-10-18 11:36:12 -07:00
fakephp.c PCI Hotplug: move pci_hotplug.h to include/linux/ 2006-10-18 11:36:12 -07:00
ibmphp_core.c
ibmphp_ebda.c
ibmphp_hpc.c
ibmphp_pci.c
ibmphp_res.c
ibmphp.h PCI Hotplug: move pci_hotplug.h to include/linux/ 2006-10-18 11:36:12 -07:00
Kconfig
Makefile
pci_hotplug_core.c PCI Hotplug: move pci_hotplug.h to include/linux/ 2006-10-18 11:36:12 -07:00
pciehp_core.c
pciehp_ctrl.c
pciehp_hpc.c
pciehp_pci.c
pciehp.h PCI Hotplug: move pci_hotplug.h to include/linux/ 2006-10-18 11:36:12 -07:00
pcihp_skeleton.c PCI Hotplug: move pci_hotplug.h to include/linux/ 2006-10-18 11:36:12 -07:00
rpadlpar_core.c
rpadlpar_sysfs.c PCI Hotplug: move pci_hotplug.h to include/linux/ 2006-10-18 11:36:12 -07:00
rpadlpar.h
rpaphp_core.c PCI Hotplug: move pci_hotplug.h to include/linux/ 2006-10-18 11:36:12 -07:00
rpaphp_pci.c
rpaphp_slot.c
rpaphp.h [PATCH] Fix up rpaphp driver for pci hotplug header move 2006-10-20 17:56:39 -07:00
sgi_hotplug.c Altix: SN ACPI hotplug support. 2006-12-01 14:36:58 -08:00
shpchp_core.c
shpchp_ctrl.c
shpchp_hpc.c
shpchp_pci.c
shpchp_sysfs.c
shpchp.h PCI Hotplug: move pci_hotplug.h to include/linux/ 2006-10-18 11:36:12 -07:00