CLK: SPEAr: make structure field and function argument as const
authorBhumika Goyal <bhumirks@gmail.com>
Tue, 17 Oct 2017 14:38:33 +0000 (16:38 +0200)
committerStephen Boyd <sboyd@codeaurora.org>
Thu, 2 Nov 2017 06:22:32 +0000 (23:22 -0700)
Make the masks field of clk_aux structure const as it do not modify the
fields of the aux_clk_masks structure it points to.

Make the struct aux_clk_masks *aux argument of the function
clk_register_aux as const as the argument is only stored in the masks
field of a clk_aux structure which is now made const.

Signed-off-by: Bhumika Goyal <bhumirks@gmail.com>
Acked-by: Viresh Kumar <viresh.kumar@linaro.org>
Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
drivers/clk/spear/clk-aux-synth.c
drivers/clk/spear/clk.h

index f271c350ef9404838fcaa6502db28cd1db5a744c..8bea5dfc770b1d1411968f604c753c298b973b3f 100644 (file)
@@ -136,7 +136,7 @@ static struct clk_ops clk_aux_ops = {
 
 struct clk *clk_register_aux(const char *aux_name, const char *gate_name,
                const char *parent_name, unsigned long flags, void __iomem *reg,
-               struct aux_clk_masks *masks, struct aux_rate_tbl *rtbl,
+               const struct aux_clk_masks *masks, struct aux_rate_tbl *rtbl,
                u8 rtbl_cnt, spinlock_t *lock, struct clk **gate_clk)
 {
        struct clk_aux *aux;
index 9834944f08b1dafff2a24835a5b1e57b010e3e4a..af0e25f496c1a112ac3dc89d9f3b8e14aea3fd32 100644 (file)
@@ -49,7 +49,7 @@ struct aux_rate_tbl {
 struct clk_aux {
        struct                  clk_hw hw;
        void __iomem            *reg;
-       struct aux_clk_masks    *masks;
+       const struct aux_clk_masks *masks;
        struct aux_rate_tbl     *rtbl;
        u8                      rtbl_cnt;
        spinlock_t              *lock;
@@ -112,7 +112,7 @@ typedef unsigned long (*clk_calc_rate)(struct clk_hw *hw, unsigned long prate,
 /* clk register routines */
 struct clk *clk_register_aux(const char *aux_name, const char *gate_name,
                const char *parent_name, unsigned long flags, void __iomem *reg,
-               struct aux_clk_masks *masks, struct aux_rate_tbl *rtbl,
+               const struct aux_clk_masks *masks, struct aux_rate_tbl *rtbl,
                u8 rtbl_cnt, spinlock_t *lock, struct clk **gate_clk);
 struct clk *clk_register_frac(const char *name, const char *parent_name,
                unsigned long flags, void __iomem *reg,