Skip to content

Commit b452d2c

Browse files
jhovolddlezcano
authored andcommitted
clocksource/drivers/nxp-stm: Fix section mismatches
Platform drivers can be probed after their init sections have been discarded (e.g. on probe deferral or manual rebind through sysfs) so the probe function must not live in init. Device managed resource actions similarly cannot be discarded. The "_probe" suffix of the driver structure name prevents modpost from warning about this so replace it to catch any similar future issues. 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> Cc: stable@vger.kernel.org # 6.16 Cc: Daniel Lezcano <daniel.lezcano@linaro.org> Link: https://patch.msgid.link/20251017054943.7195-1-johan@kernel.org
1 parent 62524f2 commit b452d2c

1 file changed

Lines changed: 9 additions & 9 deletions

File tree

drivers/clocksource/timer-nxp-stm.c

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -177,15 +177,15 @@ static void nxp_stm_clocksource_resume(struct clocksource *cs)
177177
nxp_stm_clocksource_enable(cs);
178178
}
179179

180-
static void __init devm_clocksource_unregister(void *data)
180+
static void devm_clocksource_unregister(void *data)
181181
{
182182
struct stm_timer *stm_timer = data;
183183

184184
clocksource_unregister(&stm_timer->cs);
185185
}
186186

187-
static int __init nxp_stm_clocksource_init(struct device *dev, struct stm_timer *stm_timer,
188-
const char *name, void __iomem *base, struct clk *clk)
187+
static int nxp_stm_clocksource_init(struct device *dev, struct stm_timer *stm_timer,
188+
const char *name, void __iomem *base, struct clk *clk)
189189
{
190190
int ret;
191191

@@ -296,9 +296,9 @@ static void nxp_stm_clockevent_resume(struct clock_event_device *ced)
296296
nxp_stm_module_get(stm_timer);
297297
}
298298

299-
static int __init nxp_stm_clockevent_per_cpu_init(struct device *dev, struct stm_timer *stm_timer,
300-
const char *name, void __iomem *base, int irq,
301-
struct clk *clk, int cpu)
299+
static int nxp_stm_clockevent_per_cpu_init(struct device *dev, struct stm_timer *stm_timer,
300+
const char *name, void __iomem *base, int irq,
301+
struct clk *clk, int cpu)
302302
{
303303
stm_timer->base = base;
304304
stm_timer->rate = clk_get_rate(clk);
@@ -386,7 +386,7 @@ static irqreturn_t nxp_stm_module_interrupt(int irq, void *dev_id)
386386
return IRQ_HANDLED;
387387
}
388388

389-
static int __init nxp_stm_timer_probe(struct platform_device *pdev)
389+
static int nxp_stm_timer_probe(struct platform_device *pdev)
390390
{
391391
struct stm_timer *stm_timer;
392392
struct device *dev = &pdev->dev;
@@ -482,14 +482,14 @@ static const struct of_device_id nxp_stm_of_match[] = {
482482
};
483483
MODULE_DEVICE_TABLE(of, nxp_stm_of_match);
484484

485-
static struct platform_driver nxp_stm_probe = {
485+
static struct platform_driver nxp_stm_driver = {
486486
.probe = nxp_stm_timer_probe,
487487
.driver = {
488488
.name = "nxp-stm",
489489
.of_match_table = nxp_stm_of_match,
490490
},
491491
};
492-
module_platform_driver(nxp_stm_probe);
492+
module_platform_driver(nxp_stm_driver);
493493

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

0 commit comments

Comments
 (0)