These changes are the raw update to linux-4.4.6-rt14. Kernel sources
[kvmfornfv.git] / kernel / drivers / clk / clk-mux.c
index 69a094c..7129c86 100644 (file)
@@ -10,7 +10,6 @@
  * Simple multiplexer clock implementation
  */
 
-#include <linux/clk.h>
 #include <linux/clk-provider.h>
 #include <linux/module.h>
 #include <linux/slab.h>
@@ -32,7 +31,7 @@
 static u8 clk_mux_get_parent(struct clk_hw *hw)
 {
        struct clk_mux *mux = to_clk_mux(hw);
-       int num_parents = __clk_get_num_parents(hw->clk);
+       int num_parents = clk_hw_get_num_parents(hw);
        u32 val;
 
        /*
@@ -85,6 +84,8 @@ static int clk_mux_set_parent(struct clk_hw *hw, u8 index)
 
        if (mux->lock)
                spin_lock_irqsave(mux->lock, flags);
+       else
+               __acquire(mux->lock);
 
        if (mux->flags & CLK_MUX_HIWORD_MASK) {
                val = mux->mask << (mux->shift + 16);
@@ -97,6 +98,8 @@ static int clk_mux_set_parent(struct clk_hw *hw, u8 index)
 
        if (mux->lock)
                spin_unlock_irqrestore(mux->lock, flags);
+       else
+               __release(mux->lock);
 
        return 0;
 }
@@ -114,7 +117,8 @@ const struct clk_ops clk_mux_ro_ops = {
 EXPORT_SYMBOL_GPL(clk_mux_ro_ops);
 
 struct clk *clk_register_mux_table(struct device *dev, const char *name,
-               const char **parent_names, u8 num_parents, unsigned long flags,
+               const char * const *parent_names, u8 num_parents,
+               unsigned long flags,
                void __iomem *reg, u8 shift, u32 mask,
                u8 clk_mux_flags, u32 *table, spinlock_t *lock)
 {
@@ -166,7 +170,8 @@ struct clk *clk_register_mux_table(struct device *dev, const char *name,
 EXPORT_SYMBOL_GPL(clk_register_mux_table);
 
 struct clk *clk_register_mux(struct device *dev, const char *name,
-               const char **parent_names, u8 num_parents, unsigned long flags,
+               const char * const *parent_names, u8 num_parents,
+               unsigned long flags,
                void __iomem *reg, u8 shift, u8 width,
                u8 clk_mux_flags, spinlock_t *lock)
 {