Skip to content

Commit b5f73d4

Browse files
committed
clk: sprd: fix compile-testing
I got a build failure with CONFIG_ARCH_SPRD=m when the main portion of the clock driver failed to get linked into the kernel: ERROR: modpost: "sprd_pll_sc_gate_ops" [drivers/clk/sprd/sc9863a-clk.ko] undefined! ERROR: modpost: "sprd_pll_ops" [drivers/clk/sprd/sc9863a-clk.ko] undefined! ERROR: modpost: "sprd_div_ops" [drivers/clk/sprd/sc9863a-clk.ko] undefined! ERROR: modpost: "sprd_comp_ops" [drivers/clk/sprd/sc9863a-clk.ko] undefined! ERROR: modpost: "sprd_mux_ops" [drivers/clk/sprd/sc9863a-clk.ko] undefined! ERROR: modpost: "sprd_gate_ops" [drivers/clk/sprd/sc9863a-clk.ko] undefined! ERROR: modpost: "sprd_sc_gate_ops" [drivers/clk/sprd/sc9863a-clk.ko] undefined! ERROR: modpost: "sprd_clk_probe" [drivers/clk/sprd/sc9863a-clk.ko] undefined! ERROR: modpost: "sprd_clk_regmap_init" [drivers/clk/sprd/sc9863a-clk.ko] undefined! ERROR: modpost: "sprd_pll_ops" [drivers/clk/sprd/sc9860-clk.ko] undefined! ERROR: modpost: "sprd_div_ops" [drivers/clk/sprd/sc9860-clk.ko] undefined! ERROR: modpost: "sprd_mux_ops" [drivers/clk/sprd/sc9860-clk.ko] undefined! This is a combination of two trivial bugs: - A platform should not be 'tristate', it should be a 'bool' symbol like the other platforms, if only for consistency, and to avoid surprises like this one. - The clk Makefile does not traverse into the sprd subdirectory if the platform is disabled but the drivers are enabled for compile-testing. Fixing either of the two would be sufficient to address the link failure, but for correctness, both need to be changed. Fixes: 2b1b799 ("arm64: change ARCH_SPRD Kconfig to tristate") Fixes: d41f59f ("clk: sprd: Add common infrastructure") Acked-by: Chunyan Zhang <[email protected]> Signed-off-by: Arnd Bergmann <[email protected]>
1 parent 78f7d98 commit b5f73d4

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

arch/arm64/Kconfig.platforms

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -248,7 +248,7 @@ config ARCH_TEGRA
248248
This enables support for the NVIDIA Tegra SoC family.
249249

250250
config ARCH_SPRD
251-
tristate "Spreadtrum SoC platform"
251+
bool "Spreadtrum SoC platform"
252252
help
253253
Support for Spreadtrum ARM based SoCs
254254

drivers/clk/Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ obj-$(CONFIG_CLK_SIFIVE) += sifive/
105105
obj-$(CONFIG_ARCH_SIRF) += sirf/
106106
obj-$(CONFIG_ARCH_SOCFPGA) += socfpga/
107107
obj-$(CONFIG_PLAT_SPEAR) += spear/
108-
obj-$(CONFIG_ARCH_SPRD) += sprd/
108+
obj-y += sprd/
109109
obj-$(CONFIG_ARCH_STI) += st/
110110
obj-$(CONFIG_ARCH_STRATIX10) += socfpga/
111111
obj-$(CONFIG_ARCH_SUNXI) += sunxi/

0 commit comments

Comments
 (0)