Switch registering platform driver to platform_driver_probe(), so the 'struct platform_driver' can be properly discarded after init and there won't be need of __refdata to silence DEBUG_SECTION_MISMATCH. The change requires using subsys_initcall instead of core_initcall, because no device drivers would bound in the latter, as required by platform_driver_probe(). Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@xxxxxxxxxx> --- drivers/clk/samsung/clk-exynosautov920.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/drivers/clk/samsung/clk-exynosautov920.c b/drivers/clk/samsung/clk-exynosautov920.c index 2a8bfd5d9abc8acced4e5a3eaacefe5fa724cbd2..e0ba75fd20177022dc7f461af5968c154b6a8a37 100644 --- a/drivers/clk/samsung/clk-exynosautov920.c +++ b/drivers/clk/samsung/clk-exynosautov920.c @@ -1447,17 +1447,16 @@ static const struct of_device_id exynosautov920_cmu_of_match[] = { { } }; -static struct platform_driver exynosautov920_cmu_driver __refdata = { +static struct platform_driver exynosautov920_cmu_driver __initdata = { .driver = { .name = "exynosautov920-cmu", .of_match_table = exynosautov920_cmu_of_match, .suppress_bind_attrs = true, }, - .probe = exynosautov920_cmu_probe, }; static int __init exynosautov920_cmu_init(void) { - return platform_driver_register(&exynosautov920_cmu_driver); + return platform_driver_probe(&exynosautov920_cmu_driver, exynosautov920_cmu_probe); } -core_initcall(exynosautov920_cmu_init); +subsys_initcall(exynosautov920_cmu_init); -- 2.43.0