Commit 6a241689 authored by Johan Hovold's avatar Johan Hovold Committed by Daniel Lezcano
Browse files

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: cec32ac7 ("clocksource/drivers/nxp-timer: Add the System Timer Module for the s32gx platforms")
Signed-off-by: default avatarJohan Hovold <johan@kernel.org>
Signed-off-by: default avatarDaniel Lezcano <daniel.lezcano@linaro.org>
Link: https://patch.msgid.link/20251111153226.579-4-johan@kernel.org
parent e25f964c
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -487,9 +487,10 @@ static struct platform_driver nxp_stm_driver = {
	.driver	= {
		.name		= "nxp-stm",
		.of_match_table	= nxp_stm_of_match,
		.suppress_bind_attrs = true,
	},
};
module_platform_driver(nxp_stm_driver);
builtin_platform_driver(nxp_stm_driver);

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