Skip to content

Commit e25f964

Browse files
jhovolddlezcano
authored andcommitted
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: bee33f2 ("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
1 parent 6aa10f0 commit e25f964

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

drivers/clocksource/timer-nxp-pit.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -374,9 +374,10 @@ static struct platform_driver nxp_pit_driver = {
374374
.driver = {
375375
.name = "nxp-pit",
376376
.of_match_table = pit_timer_of_match,
377+
.suppress_bind_attrs = true,
377378
},
378379
.probe = pit_timer_probe,
379380
};
380-
module_platform_driver(nxp_pit_driver);
381+
builtin_platform_driver(nxp_pit_driver);
381382

382383
TIMER_OF_DECLARE(vf610, "fsl,vf610-pit", pit_timer_init);

0 commit comments

Comments
 (0)