[PATCH 38/42] clk: at91: clk-slow: remove parent_names support

Claudiu Beznea claudiu.beznea at tuxon.dev
Wed Jul 26 22:31:52 PDT 2023


Remove parent_names support as parent_hw support is now available on all
platforms using clk-slow driver.

Signed-off-by: Claudiu Beznea <claudiu.beznea at tuxon.dev>
---
 drivers/clk/at91/at91sam9260.c | 2 +-
 drivers/clk/at91/clk-slow.c    | 8 ++------
 drivers/clk/at91/dt-compat.c   | 2 +-
 drivers/clk/at91/pmc.h         | 1 -
 4 files changed, 4 insertions(+), 9 deletions(-)

diff --git a/drivers/clk/at91/at91sam9260.c b/drivers/clk/at91/at91sam9260.c
index c118ff23548b..97efc39a7e2b 100644
--- a/drivers/clk/at91/at91sam9260.c
+++ b/drivers/clk/at91/at91sam9260.c
@@ -390,7 +390,7 @@ static void __init at91sam926x_pmc_setup(struct device_node *np,
 
 		parent_hws[0] = hw;
 		parent_hws[1] = slow_xtal_hw;
-		hw = at91_clk_register_sam9260_slow(regmap, "slck", NULL, parent_hws, 2);
+		hw = at91_clk_register_sam9260_slow(regmap, "slck", parent_hws, 2);
 		if (IS_ERR(hw))
 			goto err_free;
 
diff --git a/drivers/clk/at91/clk-slow.c b/drivers/clk/at91/clk-slow.c
index bea66216ed82..ee2dfc44d29e 100644
--- a/drivers/clk/at91/clk-slow.c
+++ b/drivers/clk/at91/clk-slow.c
@@ -38,7 +38,6 @@ static const struct clk_ops sam9260_slow_ops = {
 struct clk_hw * __init
 at91_clk_register_sam9260_slow(struct regmap *regmap,
 			       const char *name,
-			       const char **parent_names,
 			       struct clk_hw **parent_hws,
 			       int num_parents)
 {
@@ -50,7 +49,7 @@ at91_clk_register_sam9260_slow(struct regmap *regmap,
 	if (!name)
 		return ERR_PTR(-EINVAL);
 
-	if (!parent_names || !num_parents)
+	if (!parent_hws || !num_parents)
 		return ERR_PTR(-EINVAL);
 
 	slowck = kzalloc(sizeof(*slowck), GFP_KERNEL);
@@ -59,10 +58,7 @@ at91_clk_register_sam9260_slow(struct regmap *regmap,
 
 	init.name = name;
 	init.ops = &sam9260_slow_ops;
-	if (parent_hws)
-		init.parent_hws = (const struct clk_hw **)&parent_hws;
-	else
-		init.parent_names = parent_names;
+	init.parent_hws = (const struct clk_hw **)&parent_hws;
 	init.num_parents = num_parents;
 	init.flags = 0;
 
diff --git a/drivers/clk/at91/dt-compat.c b/drivers/clk/at91/dt-compat.c
index 11fdbca8ee83..90d92a410097 100644
--- a/drivers/clk/at91/dt-compat.c
+++ b/drivers/clk/at91/dt-compat.c
@@ -920,7 +920,7 @@ static void __init of_at91sam9260_clk_slow_setup(struct device_node *np)
 
 	of_property_read_string(np, "clock-output-names", &name);
 
-	hw = at91_clk_register_sam9260_slow(regmap, name, NULL, parent_hws,
+	hw = at91_clk_register_sam9260_slow(regmap, name, parent_hws,
 					    num_parents);
 	if (IS_ERR(hw))
 		return;
diff --git a/drivers/clk/at91/pmc.h b/drivers/clk/at91/pmc.h
index fe86cca2776e..a0b49dd3749f 100644
--- a/drivers/clk/at91/pmc.h
+++ b/drivers/clk/at91/pmc.h
@@ -232,7 +232,6 @@ at91_clk_register_programmable(struct regmap *regmap, const char *name,
 struct clk_hw * __init
 at91_clk_register_sam9260_slow(struct regmap *regmap,
 			       const char *name,
-			       const char **parent_names,
 			       struct clk_hw **parent_hws,
 			       int num_parents);
 
-- 
2.39.2




More information about the linux-arm-kernel mailing list