Skip to content
Commit 3f2290e1 authored by Michael Ellerman's avatar Michael Ellerman
Browse files

powerpc/sysfs: Move #ifdef CONFIG_HOTPLUG_CPU out of the function body



The entire body of unregister_cpu_online() is inside an #ifdef
CONFIG_HOTPLUG_CPU block. This is ugly and means we create an empty function
when hotplug is disabled for no reason.

Instead move the #ifdef out of the function body and define the function to be
NULL in the else case. This means we'll pass NULL to cpuhp_setup_state(), but
that's fine because it accepts NULL to mean there is no teardown callback, which
is exactly what we want.

Signed-off-by: default avatarMichael Ellerman <mpe@ellerman.id.au>
parent 687b8f24
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