Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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: bee33f22d7c3 ("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

authored by

Johan Hovold and committed by
Daniel Lezcano
e25f964c 6aa10f0e

+2 -1
+2 -1
drivers/clocksource/timer-nxp-pit.c
··· 374 374 .driver = { 375 375 .name = "nxp-pit", 376 376 .of_match_table = pit_timer_of_match, 377 + .suppress_bind_attrs = true, 377 378 }, 378 379 .probe = pit_timer_probe, 379 380 }; 380 - module_platform_driver(nxp_pit_driver); 381 + builtin_platform_driver(nxp_pit_driver); 381 382 382 383 TIMER_OF_DECLARE(vf610, "fsl,vf610-pit", pit_timer_init);