diff mbox series

macintosh/via-pmu: register_pmu_pm_ops() can be __init

Message ID 20240821082101.877438-1-mpe@ellerman.id.au (mailing list archive)
State Accepted
Commit a5a670df1db79f4bb462601aa4cc03caffa761a2
Headers show
Series macintosh/via-pmu: register_pmu_pm_ops() can be __init | expand

Checks

Context Check Description
snowpatch_ozlabs/github-powerpc_clang success Successfully ran 5 jobs.
snowpatch_ozlabs/github-powerpc_sparse success Successfully ran 4 jobs.
snowpatch_ozlabs/github-powerpc_kernel_qemu success Successfully ran 21 jobs.

Commit Message

Michael Ellerman Aug. 21, 2024, 8:21 a.m. UTC
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.

Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
---
 drivers/macintosh/via-pmu.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Geert Uytterhoeven Aug. 26, 2024, 7:42 a.m. UTC | #1
On Wed, Aug 21, 2024 at 10:21 AM Michael Ellerman <mpe@ellerman.id.au> wrote:
> 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.
>
> Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>

Reviewed-by: Geert Uytterhoeven <geert@linux-m68k.org>

Gr{oetje,eeting}s,

                        Geert
Michael Ellerman Sept. 6, 2024, 11:52 a.m. UTC | #2
On Wed, 21 Aug 2024 18:21:01 +1000, Michael Ellerman wrote:
> 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.
> 
> 

Applied to powerpc/next.

[1/1] macintosh/via-pmu: register_pmu_pm_ops() can be __init
      https://git.kernel.org/powerpc/c/a5a670df1db79f4bb462601aa4cc03caffa761a2

cheers
diff mbox series

Patch

diff --git a/drivers/macintosh/via-pmu.c b/drivers/macintosh/via-pmu.c
index 7b7808281292..2f131ab9bb15 100644
--- a/drivers/macintosh/via-pmu.c
+++ b/drivers/macintosh/via-pmu.c
@@ -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();