[PATCH 19/24] clk: implement clk_hw_reparent

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Make porting Linux clock driver code using clk_hw_reparent easier.

Signed-off-by: Ahmad Fatoum <a.fatoum@xxxxxxxxxxxxxx>
---
 include/linux/clk.h | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/include/linux/clk.h b/include/linux/clk.h
index c0e998e54ae6..1a9c0aa69c43 100644
--- a/include/linux/clk.h
+++ b/include/linux/clk.h
@@ -241,6 +241,14 @@ int clk_hw_set_rate(struct clk_hw *hw, unsigned long rate);
 int clk_set_parent(struct clk *clk, struct clk *parent);
 int clk_hw_set_parent(struct clk_hw *hw, struct clk_hw *hwp);
 
+static inline void clk_hw_reparent(struct clk_hw *hw, struct clk_hw *new_parent)
+{
+	if (!hw)
+		return;
+
+	clk_hw_set_parent(hw, new_parent);
+}
+
 /**
  * clk_get_parent - get the parent clock source for this clock
  * @clk: clock source
-- 
2.30.2


_______________________________________________
barebox mailing list
barebox@xxxxxxxxxxxxxxxxxxx
http://lists.infradead.org/mailman/listinfo/barebox



[Index of Archives]     [Linux Embedded]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux