Skip to contentSkip to conversation

clk: Pass correct arguments to __clk_hw_register_gate()

PATCH In review Stephen Boyd 2 participants 3 messages Mar 25, 2020 Common clk

lore
Share & tools
lore

Stephen Boyd

author maintainer
#0 lore raw

PATCH 1/1 clk: Pass correct arguments to __clk_hw_register_gate()

I copy/pasted these macros and forgot to update the argument names and where they're passed to. Fix it so that these macros make sense.

Fixes 194efb6e2667 ("clk: gate: Add support for specifying parents via DT/pointers")
---
 include/linux/clk-provider.h | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)
include/linux/clk-provider.h +5 -5
index 952ac035bab9..95cc8a4f6e39 100644
@@ -522,9 +522,9 @@ struct clk *clk_register_gate(struct device *dev, const char *name,
  * @clk_gate_flags: gate-specific flags for this clock
  * @lock: shared register lock for this clock
  */
-#define clk_hw_register_gate_parent_hw(dev, name, parent_name, flags, reg,    \
+#define clk_hw_register_gate_parent_hw(dev, name, parent_hw, flags, reg,      \
 				       bit_idx, clk_gate_flags, lock)	      \
-	__clk_hw_register_gate((dev), NULL, (name), (parent_name), NULL,      \
+	__clk_hw_register_gate((dev), NULL, (name), NULL, (parent_hw),        \
 			       NULL, (flags), (reg), (bit_idx),		      \
 			       (clk_gate_flags), (lock))
 /**
@@ -539,10 +539,10 @@ struct clk *clk_register_gate(struct device *dev, const char *name,
  * @clk_gate_flags: gate-specific flags for this clock
  * @lock: shared register lock for this clock
  */
-#define clk_hw_register_gate_parent_data(dev, name, parent_name, flags, reg,  \
+#define clk_hw_register_gate_parent_data(dev, name, parent_data, flags, reg,  \
 				       bit_idx, clk_gate_flags, lock)	      \
-	__clk_hw_register_gate((dev), NULL, (name), (parent_name), NULL,      \
-			       NULL, (flags), (reg), (bit_idx),		      \
+	__clk_hw_register_gate((dev), NULL, (name), NULL, NULL, (parent_data) \
+			       (flags), (reg), (bit_idx),		      \
 			       (clk_gate_flags), (lock))
 void clk_unregister_gate(struct clk *clk);
 void clk_hw_unregister_gate(struct clk_hw *hw);
Signature · 1 line
Sent by a computer, using git, on the internet
author maintainer
#1 lore raw

Quoting Stephen Boyd (2020-03-24 19:22:57)

Quoted 5 lines
include/linux/clk-provider.h +0 -0
index 952ac035bab9..95cc8a4f6e39 100644

include/linux/clk-provider.h struct clk *clk_register_gate(struct device *dev, const char *name, · line 544

Quoted 9 lines
include/linux/clk-provider.h +2 -3
@@ -539,10 +539,10 @@ struct clk *clk_register_gate(struct device *dev, const char *name,
  * @clk_gate_flags: gate-specific flags for this clock
  * @lock: shared register lock for this clock
  */
-#define clk_hw_register_gate_parent_data(dev, name, parent_name, flags, reg,  \
+#define clk_hw_register_gate_parent_data(dev, name, parent_data, flags, reg,  \
                                       bit_idx, clk_gate_flags, lock)         \
-       __clk_hw_register_gate((dev), NULL, (name), (parent_name), NULL,      \
-                              NULL, (flags), (reg), (bit_idx),               \
+       __clk_hw_register_gate((dev), NULL, (name), NULL, NULL, (parent_data) \

And this needs a comma after it.

I'll apply this to clk-fixes and send to Linus in the next few days.

Quoted 2 lines
include/linux/clk-provider.h +1 -0
+                              (flags), (reg), (bit_idx),                     \
                               (clk_gate_flags), (lock))
Tested-by
#2 lore raw
Quoted 18 lines · Stephen Boyd

Quoting Stephen Boyd (2020-03-24 19:22:57)

Quoted 5 lines
include/linux/clk-provider.h +0 -0
index 952ac035bab9..95cc8a4f6e39 100644

include/linux/clk-provider.h struct clk *clk_register_gate(struct device *dev, const char *name, · line 544

Quoted 9 lines
include/linux/clk-provider.h +2 -3
@@ -539,10 +539,10 @@ struct clk *clk_register_gate(struct device *dev, const char *name,
  * @clk_gate_flags: gate-specific flags for this clock
  * @lock: shared register lock for this clock
  */
-#define clk_hw_register_gate_parent_data(dev, name, parent_name, flags, reg,  \
+#define clk_hw_register_gate_parent_data(dev, name, parent_data, flags, reg,  \
                                       bit_idx, clk_gate_flags, lock)         \
-       __clk_hw_register_gate((dev), NULL, (name), (parent_name), NULL,      \
-                              NULL, (flags), (reg), (bit_idx),               \
+       __clk_hw_register_gate((dev), NULL, (name), NULL, NULL, (parent_data) \

And this needs a comma after it.

Quoted 1 line

I'll apply this to clk-fixes and send to Linus in the next few days.

With that fix,

Maxime