summaryrefslogtreecommitdiff
path: root/arch/powerpc/platforms/powernv/opal-power.c
diff options
context:
space:
mode:
authorMahesh Salgaonkar <mahesh@linux.vnet.ibm.com>2018-12-13 11:17:31 +0530
committerMichael Ellerman <mpe@ellerman.id.au>2018-12-21 11:32:49 +1100
commit08fb726df13778a54592aaa1deea6a154637c868 (patch)
tree97bd41545866508119afff9ec6a1b82390ce2593 /arch/powerpc/platforms/powernv/opal-power.c
parentae6263cc33742d1c179510b6aadd31108fe89a89 (diff)
powerpc/powernv: Move opal_power_control_init() call in opal_init().
opal_power_control_init() depends on opal message notifier to be initialized, which is done in opal_init()->opal_message_init(). But both these initialization are called through machine initcalls and it all depends on in which order they being called. So far these are called in correct order (may be we got lucky) and never saw any issue. But it is clearer to control initialization order explicitly by moving opal_power_control_init() into opal_init(). Signed-off-by: Mahesh Salgaonkar <mahesh@linux.vnet.ibm.com> Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Diffstat (limited to 'arch/powerpc/platforms/powernv/opal-power.c')
-rw-r--r--arch/powerpc/platforms/powernv/opal-power.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/arch/powerpc/platforms/powernv/opal-power.c b/arch/powerpc/platforms/powernv/opal-power.c
index 58dc3308237f..89ab1da57657 100644
--- a/arch/powerpc/platforms/powernv/opal-power.c
+++ b/arch/powerpc/platforms/powernv/opal-power.c
@@ -138,7 +138,7 @@ static struct notifier_block opal_power_control_nb = {
.priority = 0,
};
-static int __init opal_power_control_init(void)
+int __init opal_power_control_init(void)
{
int ret, supported = 0;
struct device_node *np;
@@ -176,4 +176,3 @@ static int __init opal_power_control_init(void)
return 0;
}
-machine_subsys_initcall(powernv, opal_power_control_init);