[PATCH] clk: lan966x: Fix linking error

Horatiu Vultur posted 1 patch 4 years, 4 months ago
drivers/clk/Kconfig | 2 ++
1 file changed, 2 insertions(+)
[PATCH] clk: lan966x: Fix linking error
Posted by Horatiu Vultur 4 years, 4 months ago
If the config options HAS_IOMEM is not set then the driver fails to link
with the following error:
clk-lan966x.c:(.text+0x950): undefined reference to
`devm_platform_ioremap_resource'

Therefor add missing dependencies: HAS_IOMEM and OF.

Fixes: 54104ee02333 ("clk: lan966x: Add lan966x SoC clock driver")
Reported-by: kernel test robot <lkp@intel.com>
Signed-off-by: Horatiu Vultur <horatiu.vultur@microchip.com>
---
 drivers/clk/Kconfig | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/clk/Kconfig b/drivers/clk/Kconfig
index 4a8451f61f37..6f03c29c40be 100644
--- a/drivers/clk/Kconfig
+++ b/drivers/clk/Kconfig
@@ -232,6 +232,8 @@ config COMMON_CLK_GEMINI
 
 config COMMON_CLK_LAN966X
 	bool "Generic Clock Controller driver for LAN966X SoC"
+	depends on HAS_IOMEM
+	depends on OF
 	help
 	  This driver provides support for Generic Clock Controller(GCK) on
 	  LAN966X SoC. GCK generates and supplies clock to various peripherals
-- 
2.33.0

Re: [PATCH] clk: lan966x: Fix linking error
Posted by Nicolas Ferre 4 years, 4 months ago
On 19/02/2022 at 15:15, Horatiu Vultur wrote:
> If the config options HAS_IOMEM is not set then the driver fails to link
> with the following error:
> clk-lan966x.c:(.text+0x950): undefined reference to
> `devm_platform_ioremap_resource'
> 
> Therefor add missing dependencies: HAS_IOMEM and OF.
> 
> Fixes: 54104ee02333 ("clk: lan966x: Add lan966x SoC clock driver")
> Reported-by: kernel test robot <lkp@intel.com>
> Signed-off-by: Horatiu Vultur <horatiu.vultur@microchip.com>

Reviewed-by: Nicolas Ferre <nicolas.ferre@microchip.com>

> ---
>   drivers/clk/Kconfig | 2 ++
>   1 file changed, 2 insertions(+)
> 
> diff --git a/drivers/clk/Kconfig b/drivers/clk/Kconfig
> index 4a8451f61f37..6f03c29c40be 100644
> --- a/drivers/clk/Kconfig
> +++ b/drivers/clk/Kconfig
> @@ -232,6 +232,8 @@ config COMMON_CLK_GEMINI
>   
>   config COMMON_CLK_LAN966X
>   	bool "Generic Clock Controller driver for LAN966X SoC"
> +	depends on HAS_IOMEM
> +	depends on OF
>   	help
>   	  This driver provides support for Generic Clock Controller(GCK) on
>   	  LAN966X SoC. GCK generates and supplies clock to various peripherals


-- 
Nicolas Ferre
Re: [PATCH] clk: lan966x: Fix linking error
Posted by Stephen Boyd 4 years, 4 months ago
Quoting Horatiu Vultur (2022-02-19 06:15:36)
> If the config options HAS_IOMEM is not set then the driver fails to link
> with the following error:
> clk-lan966x.c:(.text+0x950): undefined reference to
> `devm_platform_ioremap_resource'
> 
> Therefor add missing dependencies: HAS_IOMEM and OF.
> 
> Fixes: 54104ee02333 ("clk: lan966x: Add lan966x SoC clock driver")
> Reported-by: kernel test robot <lkp@intel.com>
> Signed-off-by: Horatiu Vultur <horatiu.vultur@microchip.com>
> ---

Applied to clk-fixes