Skip to contentSkip to conversation

clk: mxs: make clk_ops const

PATCH Applied Bhumika Goyal 2 participants 2 messages Aug 22, 2017 – Nov 2, 2017

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 clk: mxs: make clk_ops const

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

---
 drivers/clk/mxs/clk-div.c  | 2 +-
 drivers/clk/mxs/clk-frac.c | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
drivers/clk/mxs/clk-div.c +1 -1
index f75e989..ccebd01 100644
@@ -67,7 +67,7 @@ static int clk_div_set_rate(struct clk_hw *hw, unsigned long rate,
 	return ret;
 }
 
-static struct clk_ops clk_div_ops = {
+static const struct clk_ops clk_div_ops = {
 	.recalc_rate = clk_div_recalc_rate,
 	.round_rate = clk_div_round_rate,
 	.set_rate = clk_div_set_rate,
drivers/clk/mxs/clk-frac.c +1 -1
index f8dd10f..27b3372 100644
@@ -107,7 +107,7 @@ static int clk_frac_set_rate(struct clk_hw *hw, unsigned long rate,
 	return mxs_clk_wait(frac->reg, frac->busy);
 }
 
-static struct clk_ops clk_frac_ops = {
+static const struct clk_ops clk_frac_ops = {
 	.recalc_rate = clk_frac_recalc_rate,
 	.round_rate = clk_frac_round_rate,
 	.set_rate = clk_frac_set_rate,
Signature · 1 line
1.9.1
Applied
#1 lore raw
Quoted 5 lines · Bhumika Goyal

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

---

Applied to clk-next

Signature · 2 lines
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum,
a Linux Foundation Collaborative Project