• Michael Ellerman's avatar
    powerpc/sysfs: Move #ifdef CONFIG_HOTPLUG_CPU out of the function body · 3f2290e1
    Michael Ellerman authored
    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>
    3f2290e1
sysfs.c 24.8 KB