diff mbox series

clk: qcom: fix module autoloading

Message ID 20240410155356.224098-1-krzk@kernel.org (mailing list archive)
State Awaiting Upstream, archived
Headers show
Series clk: qcom: fix module autoloading | expand

Commit Message

Krzysztof Kozlowski April 10, 2024, 3:53 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/qcom/gcc-msm8917.c | 1 +
 drivers/clk/qcom/gcc-msm8953.c | 1 +
 2 files changed, 2 insertions(+)

Comments

Neil Armstrong April 10, 2024, 3:55 p.m. UTC | #1
On 10/04/2024 17:53, 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/qcom/gcc-msm8917.c | 1 +
>   drivers/clk/qcom/gcc-msm8953.c | 1 +
>   2 files changed, 2 insertions(+)
> 
> diff --git a/drivers/clk/qcom/gcc-msm8917.c b/drivers/clk/qcom/gcc-msm8917.c
> index f2dd132e2fb1..f2b8729e4198 100644
> --- a/drivers/clk/qcom/gcc-msm8917.c
> +++ b/drivers/clk/qcom/gcc-msm8917.c
> @@ -3278,6 +3278,7 @@ static const struct of_device_id gcc_msm8917_match_table[] = {
>   	{ .compatible = "qcom,gcc-qm215", .data = &gcc_qm215_desc },
>   	{},
>   };
> +MODULE_DEVICE_TABLE(of, gcc_msm8917_match_table);
>   
>   static struct platform_driver gcc_msm8917_driver = {
>   	.probe = gcc_msm8917_probe,
> diff --git a/drivers/clk/qcom/gcc-msm8953.c b/drivers/clk/qcom/gcc-msm8953.c
> index 68359534ff25..7563bff58118 100644
> --- a/drivers/clk/qcom/gcc-msm8953.c
> +++ b/drivers/clk/qcom/gcc-msm8953.c
> @@ -4227,6 +4227,7 @@ static const struct of_device_id gcc_msm8953_match_table[] = {
>   	{ .compatible = "qcom,gcc-msm8953" },
>   	{},
>   };
> +MODULE_DEVICE_TABLE(of, gcc_msm8953_match_table);
>   
>   static struct platform_driver gcc_msm8953_driver = {
>   	.probe = gcc_msm8953_probe,

Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org>
Konrad Dybcio April 10, 2024, 5:57 p.m. UTC | #2
On 4/10/24 17:53, 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>
> ---

Reviewed-by: Konrad Dybcio <konrad.dybcio@linaro.org>

Konrad
Bjorn Andersson April 12, 2024, 1:27 a.m. UTC | #3
On Wed, 10 Apr 2024 17:53:56 +0200, 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.
> 
> 

Applied, thanks!

[1/1] clk: qcom: fix module autoloading
      commit: 1aab318f1e4900fac325e0d55a0591108ea0cfbb

Best regards,
diff mbox series

Patch

diff --git a/drivers/clk/qcom/gcc-msm8917.c b/drivers/clk/qcom/gcc-msm8917.c
index f2dd132e2fb1..f2b8729e4198 100644
--- a/drivers/clk/qcom/gcc-msm8917.c
+++ b/drivers/clk/qcom/gcc-msm8917.c
@@ -3278,6 +3278,7 @@  static const struct of_device_id gcc_msm8917_match_table[] = {
 	{ .compatible = "qcom,gcc-qm215", .data = &gcc_qm215_desc },
 	{},
 };
+MODULE_DEVICE_TABLE(of, gcc_msm8917_match_table);
 
 static struct platform_driver gcc_msm8917_driver = {
 	.probe = gcc_msm8917_probe,
diff --git a/drivers/clk/qcom/gcc-msm8953.c b/drivers/clk/qcom/gcc-msm8953.c
index 68359534ff25..7563bff58118 100644
--- a/drivers/clk/qcom/gcc-msm8953.c
+++ b/drivers/clk/qcom/gcc-msm8953.c
@@ -4227,6 +4227,7 @@  static const struct of_device_id gcc_msm8953_match_table[] = {
 	{ .compatible = "qcom,gcc-msm8953" },
 	{},
 };
+MODULE_DEVICE_TABLE(of, gcc_msm8953_match_table);
 
 static struct platform_driver gcc_msm8953_driver = {
 	.probe = gcc_msm8953_probe,