]> git.ipfire.org Git - thirdparty/linux.git/commit
clk: Move clk_{save,restore}_context() to COMMON_CLK section
authorGeert Uytterhoeven <geert@linux-m68k.org>
Mon, 1 Dec 2025 09:42:26 +0000 (10:42 +0100)
committerStephen Boyd <sboyd@kernel.org>
Fri, 16 Jan 2026 02:51:43 +0000 (18:51 -0800)
commitf47c1b77d0a2a9c0d49ec14302e74f933398d1a3
tree4981d358260adac72aab5ddfcd6536208c267bce
parentef9b3b4dbe767e4ac642a88dc0507927ac545047
clk: Move clk_{save,restore}_context() to COMMON_CLK section

The clk_save_context() and clk_restore_context() helpers are only
implemented by the Common Clock Framework.  They are not available when
using legacy clock frameworks.  Dummy implementations are provided, but
only if no clock support is available at all.

Hence when CONFIG_HAVE_CLK=y, but CONFIG_COMMON_CLK is not enabled:

    m68k-linux-gnu-ld: drivers/net/phy/air_en8811h.o: in function `en8811h_resume':
    air_en8811h.c:(.text+0x83e): undefined reference to `clk_restore_context'
    m68k-linux-gnu-ld: drivers/net/phy/air_en8811h.o: in function `en8811h_suspend':
    air_en8811h.c:(.text+0x856): undefined reference to `clk_save_context'

Fix this by moving forward declarations and dummy implementions from the
HAVE_CLK to the COMMON_CLK section.

Fixes: 8b95d1ce3300c411 ("clk: Add functions to save/restore clock context en-masse")
Reported-by: kernel test robot <lkp@intel.com>
Closes: https://lore.kernel.org/oe-kbuild-all/202511301553.eaEz1nEW-lkp@intel.com/
Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
Signed-off-by: Stephen Boyd <sboyd@kernel.org>
include/linux/clk.h