diff mbox series

clk: ingenic: Use CLK_OF_DECLARE_DRIVER macro

Message ID 20190716170800.23668-1-paul@crapouillou.net (mailing list archive)
State Changes Requested, archived
Headers show
Series clk: ingenic: Use CLK_OF_DECLARE_DRIVER macro | expand

Commit Message

Paul Cercueil July 16, 2019, 5:08 p.m. UTC
By using CLK_OF_DECLARE_DRIVER instead of the CLK_OF_DECLARE macro, we
allow the driver to probe also as a platform driver.

While this driver does not have code to probe as a platform driver, this
is still useful for probing children devices in the case where the
device node is compatible with "simple-mfd".

Signed-off-by: Paul Cercueil <paul@crapouillou.net>
---
 drivers/clk/ingenic/jz4725b-cgu.c | 2 +-
 drivers/clk/ingenic/jz4740-cgu.c  | 2 +-
 drivers/clk/ingenic/jz4770-cgu.c  | 2 +-
 drivers/clk/ingenic/jz4780-cgu.c  | 2 +-
 4 files changed, 4 insertions(+), 4 deletions(-)

Comments

Stephen Boyd Aug. 8, 2019, 4:23 a.m. UTC | #1
Quoting Paul Cercueil (2019-07-16 10:08:00)
> By using CLK_OF_DECLARE_DRIVER instead of the CLK_OF_DECLARE macro, we
> allow the driver to probe also as a platform driver.
> 
> While this driver does not have code to probe as a platform driver, this
> is still useful for probing children devices in the case where the
> device node is compatible with "simple-mfd".
> 
> Signed-off-by: Paul Cercueil <paul@crapouillou.net>
> ---

What's the baseline for this? It doesn't apply cleanly to v5.3-rc1
Paul Cercueil Aug. 8, 2019, 1:20 p.m. UTC | #2
Le jeu. 8 août 2019 à 6:23, Stephen Boyd <sboyd@kernel.org> a écrit :
> Quoting Paul Cercueil (2019-07-16 10:08:00)
>>  By using CLK_OF_DECLARE_DRIVER instead of the CLK_OF_DECLARE macro, 
>> we
>>  allow the driver to probe also as a platform driver.
>> 
>>  While this driver does not have code to probe as a platform driver, 
>> this
>>  is still useful for probing children devices in the case where the
>>  device node is compatible with "simple-mfd".
>> 
>>  Signed-off-by: Paul Cercueil <paul@crapouillou.net>
>>  ---
> 
> What's the baseline for this? It doesn't apply cleanly to v5.3-rc1

You're right. I'll send a V2.

-Paul
Paul Cercueil Aug. 10, 2019, 12:34 p.m. UTC | #3
Le jeu. 8 août 2019 à 6:23, Stephen Boyd <sboyd@kernel.org> a écrit :
> Quoting Paul Cercueil (2019-07-16 10:08:00)
>>  By using CLK_OF_DECLARE_DRIVER instead of the CLK_OF_DECLARE macro, 
>> we
>>  allow the driver to probe also as a platform driver.
>> 
>>  While this driver does not have code to probe as a platform driver, 
>> this
>>  is still useful for probing children devices in the case where the
>>  device node is compatible with "simple-mfd".
>> 
>>  Signed-off-by: Paul Cercueil <paul@crapouillou.net>
>>  ---
> 
> What's the baseline for this? It doesn't apply cleanly to v5.3-rc1

I think it was v5.2-rc7. I'll send a V2 rebased on v5.3-rc3.

-Paul
diff mbox series

Patch

diff --git a/drivers/clk/ingenic/jz4725b-cgu.c b/drivers/clk/ingenic/jz4725b-cgu.c
index 47287956824b..5fd2e4e6da2d 100644
--- a/drivers/clk/ingenic/jz4725b-cgu.c
+++ b/drivers/clk/ingenic/jz4725b-cgu.c
@@ -254,4 +254,4 @@  static void __init jz4725b_cgu_init(struct device_node *np)
 	if (retval)
 		pr_err("%s: failed to register CGU Clocks\n", __func__);
 }
-CLK_OF_DECLARE(jz4725b_cgu, "ingenic,jz4725b-cgu", jz4725b_cgu_init);
+CLK_OF_DECLARE_DRIVER(jz4725b_cgu, "ingenic,jz4725b-cgu", jz4725b_cgu_init);
diff --git a/drivers/clk/ingenic/jz4740-cgu.c b/drivers/clk/ingenic/jz4740-cgu.c
index 0957ba4a40a5..a002a2d8db6f 100644
--- a/drivers/clk/ingenic/jz4740-cgu.c
+++ b/drivers/clk/ingenic/jz4740-cgu.c
@@ -246,7 +246,7 @@  static void __init jz4740_cgu_init(struct device_node *np)
 	if (retval)
 		pr_err("%s: failed to register CGU Clocks\n", __func__);
 }
-CLK_OF_DECLARE(jz4740_cgu, "ingenic,jz4740-cgu", jz4740_cgu_init);
+CLK_OF_DECLARE_DRIVER(jz4740_cgu, "ingenic,jz4740-cgu", jz4740_cgu_init);
 
 void jz4740_clock_set_wait_mode(enum jz4740_wait_mode mode)
 {
diff --git a/drivers/clk/ingenic/jz4770-cgu.c b/drivers/clk/ingenic/jz4770-cgu.c
index 2a29da442a8e..e00d22b175ec 100644
--- a/drivers/clk/ingenic/jz4770-cgu.c
+++ b/drivers/clk/ingenic/jz4770-cgu.c
@@ -472,4 +472,4 @@  static void __init jz4770_cgu_init(struct device_node *np)
 }
 
 /* We only probe via devicetree, no need for a platform driver */
-CLK_OF_DECLARE(jz4770_cgu, "ingenic,jz4770-cgu", jz4770_cgu_init);
+CLK_OF_DECLARE_DRIVER(jz4770_cgu, "ingenic,jz4770-cgu", jz4770_cgu_init);
diff --git a/drivers/clk/ingenic/jz4780-cgu.c b/drivers/clk/ingenic/jz4780-cgu.c
index 2464fc4032af..f964c4aa6cac 100644
--- a/drivers/clk/ingenic/jz4780-cgu.c
+++ b/drivers/clk/ingenic/jz4780-cgu.c
@@ -722,4 +722,4 @@  static void __init jz4780_cgu_init(struct device_node *np)
 		return;
 	}
 }
-CLK_OF_DECLARE(jz4780_cgu, "ingenic,jz4780-cgu", jz4780_cgu_init);
+CLK_OF_DECLARE_DRIVER(jz4780_cgu, "ingenic,jz4780-cgu", jz4780_cgu_init);