clk: imx: fix compile testing imxrt1050
authorArnd Bergmann <arnd@arndb.de>
Thu, 15 Dec 2022 16:58:18 +0000 (17:58 +0100)
committerStephen Boyd <sboyd@kernel.org>
Fri, 10 Feb 2023 23:25:33 +0000 (15:25 -0800)
Randconfig testing revealed multiple issues with this driver:

ERROR: modpost: missing MODULE_LICENSE() in drivers/clk/imx/clk-imxrt1050.o
ERROR: modpost: "imx_clk_hw_pllv3" [drivers/clk/imx/clk-imxrt1050.ko] undefined!
ERROR: modpost: "imx_clk_hw_pfd" [drivers/clk/imx/clk-imxrt1050.ko] undefined!

Export the necessary symbols from the core clk driver and add the
license and author tags. To find this type of problem more easily
in the future, also enable building on other platforms, as we do for
the other i.MX clk drivers.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Link: https://lore.kernel.org/r/20221215165836.2136448-1-arnd@kernel.org
Acked-by: Jesse Taube <Mr.Bossman075@gmail.com>
Reviewed-by: Abel Vesa <abel.vesa@linaro.org>
Signed-off-by: Stephen Boyd <sboyd@kernel.org>
drivers/clk/imx/Kconfig
drivers/clk/imx/clk-imxrt1050.c
drivers/clk/imx/clk-pfd.c
drivers/clk/imx/clk-pllv3.c

index 25785ec9c2762945b13b98d3e5c264828ae055a1..f6b82e0b9703a7ab807192da0d2f8410783c98b4 100644 (file)
@@ -115,7 +115,7 @@ config CLK_IMX93
 
 config CLK_IMXRT1050
        tristate "IMXRT1050 CCM Clock Driver"
-       depends on SOC_IMXRT
+       depends on SOC_IMXRT || COMPILE_TEST
        select MXC_CLK
        help
            Build the driver for i.MXRT1050 CCM Clock Driver
index e972abd299a8d2b7556a85644366786c2a7078f1..fd5c51fc92c0e760c9161b5ebdbff6196fb76652 100644 (file)
@@ -167,3 +167,7 @@ static struct platform_driver imxrt1050_clk_driver = {
        },
 };
 module_platform_driver(imxrt1050_clk_driver);
+
+MODULE_LICENSE("Dual BSD/GPL");
+MODULE_AUTHOR("Jesse Taube <Mr.Bossman075@gmail.com>");
+MODULE_AUTHOR("Giulio Benetti <giulio.benetti@benettiengineering.com>");
index 5d2a9a3be95e37e4b3fe86773a92a7f535478848..5cf0149dfa15aab8b4cee47c8120753e3df45dac 100644 (file)
@@ -5,6 +5,7 @@
  */
 
 #include <linux/clk-provider.h>
+#include <linux/export.h>
 #include <linux/io.h>
 #include <linux/slab.h>
 #include <linux/err.h>
@@ -153,3 +154,4 @@ struct clk_hw *imx_clk_hw_pfd(const char *name, const char *parent_name,
 
        return hw;
 }
+EXPORT_SYMBOL_GPL(imx_clk_hw_pfd);
index eea32f87c60aa98cb785c0534aac36a4b60809f3..11fb238ee8f0ece8116d3d7cebbbb7deaa4aee68 100644 (file)
@@ -6,6 +6,7 @@
 
 #include <linux/clk-provider.h>
 #include <linux/delay.h>
+#include <linux/export.h>
 #include <linux/io.h>
 #include <linux/iopoll.h>
 #include <linux/slab.h>
@@ -486,3 +487,4 @@ struct clk_hw *imx_clk_hw_pllv3(enum imx_pllv3_type type, const char *name,
 
        return hw;
 }
+EXPORT_SYMBOL_GPL(imx_clk_hw_pllv3);