Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

CLK: SPEAr: make structure field and function argument as const

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>

authored by

Bhumika Goyal and committed by
Stephen Boyd
71bf5ab8 2bd6bf03

+3 -3
+1 -1
drivers/clk/spear/clk-aux-synth.c
··· 136 136 137 137 struct clk *clk_register_aux(const char *aux_name, const char *gate_name, 138 138 const char *parent_name, unsigned long flags, void __iomem *reg, 139 - struct aux_clk_masks *masks, struct aux_rate_tbl *rtbl, 139 + const struct aux_clk_masks *masks, struct aux_rate_tbl *rtbl, 140 140 u8 rtbl_cnt, spinlock_t *lock, struct clk **gate_clk) 141 141 { 142 142 struct clk_aux *aux;
+2 -2
drivers/clk/spear/clk.h
··· 49 49 struct clk_aux { 50 50 struct clk_hw hw; 51 51 void __iomem *reg; 52 - struct aux_clk_masks *masks; 52 + const struct aux_clk_masks *masks; 53 53 struct aux_rate_tbl *rtbl; 54 54 u8 rtbl_cnt; 55 55 spinlock_t *lock; ··· 112 112 /* clk register routines */ 113 113 struct clk *clk_register_aux(const char *aux_name, const char *gate_name, 114 114 const char *parent_name, unsigned long flags, void __iomem *reg, 115 - struct aux_clk_masks *masks, struct aux_rate_tbl *rtbl, 115 + const struct aux_clk_masks *masks, struct aux_rate_tbl *rtbl, 116 116 u8 rtbl_cnt, spinlock_t *lock, struct clk **gate_clk); 117 117 struct clk *clk_register_frac(const char *name, const char *parent_name, 118 118 unsigned long flags, void __iomem *reg,