clocksource/drivers/nxp-pit: Prevent driver unbind

The driver does not support unbinding (e.g. as clockevents cannot be
deregistered) so suppress the bind attributes to prevent the driver from
being unbound and rebound after registration (and disabling the timer
when reprobing fails).

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: bee33f22d7 ("clocksource/drivers/nxp-pit: Add NXP Automotive s32g2 / s32g3 support")
Signed-off-by: Johan Hovold <johan@kernel.org>
Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
Link: https://patch.msgid.link/20251111153226.579-3-johan@kernel.org
This commit is contained in:
Johan Hovold 2025-11-11 16:32:25 +01:00 committed by Daniel Lezcano
parent 6aa10f0e2e
commit e25f964cf4
1 changed files with 2 additions and 1 deletions

View File

@ -374,9 +374,10 @@ static struct platform_driver nxp_pit_driver = {
.driver = { .driver = {
.name = "nxp-pit", .name = "nxp-pit",
.of_match_table = pit_timer_of_match, .of_match_table = pit_timer_of_match,
.suppress_bind_attrs = true,
}, },
.probe = pit_timer_probe, .probe = pit_timer_probe,
}; };
module_platform_driver(nxp_pit_driver); builtin_platform_driver(nxp_pit_driver);
TIMER_OF_DECLARE(vf610, "fsl,vf610-pit", pit_timer_init); TIMER_OF_DECLARE(vf610, "fsl,vf610-pit", pit_timer_init);