thermal: core: Move initialization after core initcall
authorDaniel Lezcano <daniel.lezcano@linaro.org>
Fri, 17 Jul 2020 16:42:17 +0000 (18:42 +0200)
committerDaniel Lezcano <daniel.lezcano@linaro.org>
Tue, 21 Jul 2020 08:40:08 +0000 (10:40 +0200)
commit3f5a2cbe0f5c54adcada54a6a0567690241e7b3a
treec5c3465488fabdcfc53d81215ca4ce4f076c8b9b
parentd2a89b52839597c70746d9f46a21b1aab0a26c02
thermal: core: Move initialization after core initcall

The generic netlink is initialized at subsys_initcall, so far after
the thermal init routine and the thermal generic netlink family
initialization.

On ŝome platforms, that leads to a memory corruption.

The fix was sent to netdev@ to move the genetlink framework
initialization at core_initcall.

Move the thermal core initialization to postcore level which is very
close to core level.

Reported-by: Marek Szyprowski <m.szyprowski@samsung.com>
Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
Tested-by: Marek Szyprowski <m.szyprowski@samsung.com>
Reviewed-by: Amit Kucheria <amit.kucheria@linaro.org>
Link: https://lore.kernel.org/r/20200717164217.18819-2-daniel.lezcano@linaro.org
drivers/thermal/thermal_core.c