diff options
author | Rolf Eike Beer <eike-hotplug@sf-tec.de> | 2006-11-13 15:12:45 -0800 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2006-12-01 14:36:59 -0800 |
commit | ac9e98918776d8fa6dc38bfa6d298a7dbcbac2cb (patch) | |
tree | 13f80151fffb5845e8dfc13d9f6d54a81f48daa2 /net/netrom | |
parent | adbc2a102252994c36102008293b52760613d6c3 (diff) |
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>
Diffstat (limited to 'net/netrom')
0 files changed, 0 insertions, 0 deletions