ChangeSet 1.1587.12.64, 2004/04/30 15:02:53-07:00, eike-hotplug@sf-tec.de [PATCH] RPA PCI Hotplug: fix up init_slots in rpaphp_core.c rpaphp_core.c::init_slots is not more than a for loop and is called only from one place, this inlines the important 3 lines. Als add some __init and __exit. drivers/pci/hotplug/rpaphp_core.c | 18 ++++-------------- 1 files changed, 4 insertions(+), 14 deletions(-) diff -Nru a/drivers/pci/hotplug/rpaphp_core.c b/drivers/pci/hotplug/rpaphp_core.c --- a/drivers/pci/hotplug/rpaphp_core.c Mon May 17 16:59:22 2004 +++ b/drivers/pci/hotplug/rpaphp_core.c Mon May 17 16:59:22 2004 @@ -304,32 +304,22 @@ return retval; } -/* - * init_slots - initialize 'struct slot' structures for each slot - * - */ -static void init_slots(void) +static int __init init_rpa(void) { struct device_node *dn; - for (dn = find_all_nodes(); dn; dn = dn->next) - rpaphp_add_slot(dn); -} - -static int init_rpa(void) -{ - init_MUTEX(&rpaphp_sem); /* initialize internal data structure etc. */ - init_slots(); + for (dn = find_all_nodes(); dn; dn = dn->next) + rpaphp_add_slot(dn); if (!num_slots) return -ENODEV; return 0; } -static void cleanup_slots(void) +static void __exit cleanup_slots(void) { struct list_head *tmp, *n; struct slot *slot;