macintosh/via-pmu: register_pmu_pm_ops() can be __init
authorMichael Ellerman <mpe@ellerman.id.au>
Wed, 21 Aug 2024 08:21:01 +0000 (18:21 +1000)
committerMichael Ellerman <mpe@ellerman.id.au>
Thu, 5 Sep 2024 12:30:18 +0000 (22:30 +1000)
register_pmu_pm_ops() is only called at init time, via
device_initcall(), so can be marked __init. The driver can't be built as
a module.

Reviewed-by: Geert Uytterhoeven <geert@linux-m68k.org>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Link: https://msgid.link/20240821082101.877438-1-mpe@ellerman.id.au
drivers/macintosh/via-pmu.c

index 9d5703b6093759d8abfbd9e7e27be0a7c73bca04..b0f09c70f1ff873b83dc966158aa47bdc06e83dc 100644 (file)
@@ -2334,7 +2334,7 @@ static const struct platform_suspend_ops pmu_pm_ops = {
        .valid = pmu_sleep_valid,
 };
 
-static int register_pmu_pm_ops(void)
+static int __init register_pmu_pm_ops(void)
 {
        if (pmu_kind == PMU_OHARE_BASED)
                powerbook_sleep_init_3400();