clocksource/drivers/ingenic: Fix section mismatch
authorDaniel Lezcano <daniel.lezcano@linaro.org>
Wed, 25 Nov 2020 10:23:45 +0000 (11:23 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 30 Dec 2020 10:53:33 +0000 (11:53 +0100)
commitdf4411e4b8d09a75400ee72f1fdc5cd58bb96574
tree65cbb315716f8e5286293d1ff464ea689662636f
parent93bf920799d92d883cc7240ee8bc648d5534117c
clocksource/drivers/ingenic: Fix section mismatch

[ Upstream commit 5bd7cb29eceb52e4b108917786fdbf2a2c2048ef ]

The function ingenic_tcu_get_clock() is annotated for the __init
section but it is actually called from the online cpu callback.

That will lead to a crash if a CPU is hotplugged after boot time.

Remove the __init annotation for the ingenic_tcu_get_clock()
function.

Fixes: f19d838d08fc (clocksource/drivers/ingenic: Add high resolution timer support for SMP/SMT)
Reported-by: kernel test robot <lkp@intel.com>
Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
Reviewed-by: Paul Cercueil <paul@crapouillou.net>
Tested-by: 周琰杰 (Zhou Yanjie) <zhouyanjie@wanyeetech.com>
Link: https://lore.kernel.org/r/20201125102346.1816310-1-daniel.lezcano@linaro.org
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/clocksource/ingenic-timer.c