diff mbox series

clk: meson: s4: fix module autoloading

Message ID 20240410155406.224128-1-krzk@kernel.org (mailing list archive)
State New
Headers show
Series clk: meson: s4: fix module autoloading | expand

Commit Message

Krzysztof Kozlowski April 10, 2024, 3:54 p.m. UTC
Add MODULE_DEVICE_TABLE(), so modules could be properly autoloaded
based on the alias from of_device_id table.  Clocks are considered core
components, so usually they are built-in, however these can be built and
used as modules on some generic kernel.

Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
---
 drivers/clk/meson/s4-peripherals.c | 1 +
 drivers/clk/meson/s4-pll.c         | 1 +
 2 files changed, 2 insertions(+)

Comments

Neil Armstrong April 10, 2024, 3:56 p.m. UTC | #1
On 10/04/2024 17:54, Krzysztof Kozlowski wrote:
> Add MODULE_DEVICE_TABLE(), so modules could be properly autoloaded
> based on the alias from of_device_id table.  Clocks are considered core
> components, so usually they are built-in, however these can be built and
> used as modules on some generic kernel.
> 
> Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
> ---
>   drivers/clk/meson/s4-peripherals.c | 1 +
>   drivers/clk/meson/s4-pll.c         | 1 +
>   2 files changed, 2 insertions(+)
> 
> diff --git a/drivers/clk/meson/s4-peripherals.c b/drivers/clk/meson/s4-peripherals.c
> index 6c35de3d536f..22ff030bd6a8 100644
> --- a/drivers/clk/meson/s4-peripherals.c
> +++ b/drivers/clk/meson/s4-peripherals.c
> @@ -3799,6 +3799,7 @@ static const struct of_device_id clkc_match_table[] = {
>   	},
>   	{}
>   };
> +MODULE_DEVICE_TABLE(of, clkc_match_table);
>   
>   static struct platform_driver s4_driver = {
>   	.probe		= meson_s4_periphs_probe,
> diff --git a/drivers/clk/meson/s4-pll.c b/drivers/clk/meson/s4-pll.c
> index 8dfaeccaadc2..8a917b9703bf 100644
> --- a/drivers/clk/meson/s4-pll.c
> +++ b/drivers/clk/meson/s4-pll.c
> @@ -853,6 +853,7 @@ static const struct of_device_id clkc_match_table[] = {
>   	},
>   	{}
>   };
> +MODULE_DEVICE_TABLE(of, clkc_match_table);
>   
>   static struct platform_driver s4_driver = {
>   	.probe		= meson_s4_pll_probe,

Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org>
Martin Blumenstingl April 10, 2024, 7:01 p.m. UTC | #2
On Wed, Apr 10, 2024 at 5:54 PM Krzysztof Kozlowski <krzk@kernel.org> wrote:
>
> Add MODULE_DEVICE_TABLE(), so modules could be properly autoloaded
> based on the alias from of_device_id table.  Clocks are considered core
> components, so usually they are built-in, however these can be built and
> used as modules on some generic kernel.
>
> Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
Reviewed-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
diff mbox series

Patch

diff --git a/drivers/clk/meson/s4-peripherals.c b/drivers/clk/meson/s4-peripherals.c
index 6c35de3d536f..22ff030bd6a8 100644
--- a/drivers/clk/meson/s4-peripherals.c
+++ b/drivers/clk/meson/s4-peripherals.c
@@ -3799,6 +3799,7 @@  static const struct of_device_id clkc_match_table[] = {
 	},
 	{}
 };
+MODULE_DEVICE_TABLE(of, clkc_match_table);
 
 static struct platform_driver s4_driver = {
 	.probe		= meson_s4_periphs_probe,
diff --git a/drivers/clk/meson/s4-pll.c b/drivers/clk/meson/s4-pll.c
index 8dfaeccaadc2..8a917b9703bf 100644
--- a/drivers/clk/meson/s4-pll.c
+++ b/drivers/clk/meson/s4-pll.c
@@ -853,6 +853,7 @@  static const struct of_device_id clkc_match_table[] = {
 	},
 	{}
 };
+MODULE_DEVICE_TABLE(of, clkc_match_table);
 
 static struct platform_driver s4_driver = {
 	.probe		= meson_s4_pll_probe,