clk: ti: enforce const types on string arrays
authorTero Kristo <t-kristo@ti.com>
Wed, 5 Oct 2016 12:37:02 +0000 (15:37 +0300)
committerTero Kristo <t-kristo@ti.com>
Wed, 8 Mar 2017 11:00:25 +0000 (13:00 +0200)
Constant string arrays should use const char * const instead of just
const char *. Change the implementations using these to proper type.

Signed-off-by: Tero Kristo <t-kristo@ti.com>
Acked-by: Tony Lindgren <tony@atomide.com>
drivers/clk/ti/clock.h
drivers/clk/ti/composite.c
drivers/clk/ti/mux.c

index ecf82d86118c5026a36d3efa0220723da93c202b..cb906a199e66a714f43ec7771d270918f22c0354 100644 (file)
@@ -86,7 +86,7 @@ struct ti_clk_mux {
        int num_parents;
        u16 reg;
        u8 module;
-       const char **parents;
+       const char * const *parents;
        u16 flags;
 };
 
index 3f60f990cad805f6762e17fd834509f8bceebd6d..beea89463ca2cfd996693a27926d9ea324c40eb3 100644 (file)
@@ -124,7 +124,7 @@ struct clk *ti_clk_register_composite(struct ti_clk *setup)
        struct clk_hw *mux;
        struct clk_hw *div;
        int num_parents = 1;
-       const char **parent_names = NULL;
+       const char * const *parent_names = NULL;
        struct clk *clk;
        int ret;
 
index 0da149ed1549c4ee4298351d4770521899e80eb7..3cc6db4b31fbd7e9afd7d7f088119217d8cc09ec 100644 (file)
@@ -97,10 +97,10 @@ const struct clk_ops ti_clk_mux_ops = {
 };
 
 static struct clk *_register_mux(struct device *dev, const char *name,
-                                const char **parent_names, u8 num_parents,
-                                unsigned long flags, void __iomem *reg,
-                                u8 shift, u32 mask, u8 clk_mux_flags,
-                                u32 *table)
+                                const char * const *parent_names,
+                                u8 num_parents, unsigned long flags,
+                                void __iomem *reg, u8 shift, u32 mask,
+                                u8 clk_mux_flags, u32 *table)
 {
        struct clk_mux *mux;
        struct clk *clk;