Skip to content

Commit 6a24168

Browse files
jhovolddlezcano
authored andcommitted
clocksource/drivers/nxp-stm: Prevent driver unbind
Clockevents cannot be deregistered so suppress the bind attributes to prevent the driver from being unbound and releasing the underlying resources after registration. Even if the driver can currently only be built-in, also switch to builtin_platform_driver() to prevent it from being unloaded should modular builds ever be enabled. Fixes: cec32ac ("clocksource/drivers/nxp-timer: Add the System Timer Module for the s32gx platforms") Signed-off-by: Johan Hovold <johan@kernel.org> Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org> Link: https://patch.msgid.link/20251111153226.579-4-johan@kernel.org
1 parent e25f964 commit 6a24168

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

drivers/clocksource/timer-nxp-stm.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -487,9 +487,10 @@ static struct platform_driver nxp_stm_driver = {
487487
.driver = {
488488
.name = "nxp-stm",
489489
.of_match_table = nxp_stm_of_match,
490+
.suppress_bind_attrs = true,
490491
},
491492
};
492-
module_platform_driver(nxp_stm_driver);
493+
builtin_platform_driver(nxp_stm_driver);
493494

494495
MODULE_DESCRIPTION("NXP System Timer Module driver");
495496
MODULE_LICENSE("GPL");

0 commit comments

Comments
 (0)