Commit 093d33e3 authored by Rolf Eike Beer's avatar Rolf Eike Beer Committed by Deepak Saxena

[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.
parent c9a42cf2
......@@ -304,32 +304,22 @@ int rpaphp_add_slot(struct device_node *dn)
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;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment