Commit c05afeec authored by Bhumika Goyal's avatar Bhumika Goyal Committed by James Hogan

MIPS: Alchemy: make clk_ops const

Make these const as they are only stored in the "const " ops field of a
clk_init_data structure.

Structure found using Coccinelle and changes done by hand.
Signed-off-by: default avatarBhumika Goyal <bhumirks@gmail.com>
Cc: julia.lawall@lip6.fr
Cc: linux-mips@linux-mips.org
Cc: linux-kernel@vger.kernel.org
Patchwork: https://patchwork.linux-mips.org/patch/17374/Signed-off-by: default avatarRalf Baechle <ralf@linux-mips.org>
Signed-off-by: default avatarJames Hogan <jhogan@kernel.org>
parent a58f85b5
...@@ -142,7 +142,7 @@ void __init alchemy_set_lpj(void) ...@@ -142,7 +142,7 @@ void __init alchemy_set_lpj(void)
preset_lpj /= 2 * HZ; preset_lpj /= 2 * HZ;
} }
static struct clk_ops alchemy_clkops_cpu = { static const struct clk_ops alchemy_clkops_cpu = {
.recalc_rate = alchemy_clk_cpu_recalc, .recalc_rate = alchemy_clk_cpu_recalc,
}; };
...@@ -223,7 +223,7 @@ static long alchemy_clk_aux_roundr(struct clk_hw *hw, ...@@ -223,7 +223,7 @@ static long alchemy_clk_aux_roundr(struct clk_hw *hw,
return (*parent_rate) * mult; return (*parent_rate) * mult;
} }
static struct clk_ops alchemy_clkops_aux = { static const struct clk_ops alchemy_clkops_aux = {
.recalc_rate = alchemy_clk_aux_recalc, .recalc_rate = alchemy_clk_aux_recalc,
.set_rate = alchemy_clk_aux_setr, .set_rate = alchemy_clk_aux_setr,
.round_rate = alchemy_clk_aux_roundr, .round_rate = alchemy_clk_aux_roundr,
...@@ -575,7 +575,7 @@ static int alchemy_clk_fgv1_detr(struct clk_hw *hw, ...@@ -575,7 +575,7 @@ static int alchemy_clk_fgv1_detr(struct clk_hw *hw,
} }
/* Au1000, Au1100, Au15x0, Au12x0 */ /* Au1000, Au1100, Au15x0, Au12x0 */
static struct clk_ops alchemy_clkops_fgenv1 = { static const struct clk_ops alchemy_clkops_fgenv1 = {
.recalc_rate = alchemy_clk_fgv1_recalc, .recalc_rate = alchemy_clk_fgv1_recalc,
.determine_rate = alchemy_clk_fgv1_detr, .determine_rate = alchemy_clk_fgv1_detr,
.set_rate = alchemy_clk_fgv1_setr, .set_rate = alchemy_clk_fgv1_setr,
...@@ -716,7 +716,7 @@ static int alchemy_clk_fgv2_detr(struct clk_hw *hw, ...@@ -716,7 +716,7 @@ static int alchemy_clk_fgv2_detr(struct clk_hw *hw,
} }
/* Au1300 larger input mux, no separate disable bit, flexible divider */ /* Au1300 larger input mux, no separate disable bit, flexible divider */
static struct clk_ops alchemy_clkops_fgenv2 = { static const struct clk_ops alchemy_clkops_fgenv2 = {
.recalc_rate = alchemy_clk_fgv2_recalc, .recalc_rate = alchemy_clk_fgv2_recalc,
.determine_rate = alchemy_clk_fgv2_detr, .determine_rate = alchemy_clk_fgv2_detr,
.set_rate = alchemy_clk_fgv2_setr, .set_rate = alchemy_clk_fgv2_setr,
...@@ -924,7 +924,7 @@ static int alchemy_clk_csrc_detr(struct clk_hw *hw, ...@@ -924,7 +924,7 @@ static int alchemy_clk_csrc_detr(struct clk_hw *hw,
return alchemy_clk_fgcs_detr(hw, req, scale, 4); return alchemy_clk_fgcs_detr(hw, req, scale, 4);
} }
static struct clk_ops alchemy_clkops_csrc = { static const struct clk_ops alchemy_clkops_csrc = {
.recalc_rate = alchemy_clk_csrc_recalc, .recalc_rate = alchemy_clk_csrc_recalc,
.determine_rate = alchemy_clk_csrc_detr, .determine_rate = alchemy_clk_csrc_detr,
.set_rate = alchemy_clk_csrc_setr, .set_rate = alchemy_clk_csrc_setr,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment