Commit df4f45a0 authored by Arvind Yadav's avatar Arvind Yadav Committed by Stephen Boyd

clk: ux500: prcmu: constify clk_ops.

clk_ops are not supposed to change at runtime. All functions
working with clk_ops provided by <linux/clk-provider.h> work
with const clk_ops. So mark the non-const clk_ops as const.

Here, Function "clk_reg_prcmu" is used to initialized clk_init_data.
clk_init_data is working with const clk_ops. So make clk_reg_prcmu
non-const clk_ops argument as const.
Signed-off-by: default avatarArvind Yadav <arvind.yadav.cs@gmail.com>
Acked-by: default avatarUlf Hansson <ulf.hansson@linaro.org>
Signed-off-by: default avatarStephen Boyd <sboyd@codeaurora.org>
parent 69a6beab
...@@ -186,7 +186,7 @@ static void clk_prcmu_opp_volt_unprepare(struct clk_hw *hw) ...@@ -186,7 +186,7 @@ static void clk_prcmu_opp_volt_unprepare(struct clk_hw *hw)
clk->is_prepared = 0; clk->is_prepared = 0;
} }
static struct clk_ops clk_prcmu_scalable_ops = { static const struct clk_ops clk_prcmu_scalable_ops = {
.prepare = clk_prcmu_prepare, .prepare = clk_prcmu_prepare,
.unprepare = clk_prcmu_unprepare, .unprepare = clk_prcmu_unprepare,
.is_prepared = clk_prcmu_is_prepared, .is_prepared = clk_prcmu_is_prepared,
...@@ -198,7 +198,7 @@ static struct clk_ops clk_prcmu_scalable_ops = { ...@@ -198,7 +198,7 @@ static struct clk_ops clk_prcmu_scalable_ops = {
.set_rate = clk_prcmu_set_rate, .set_rate = clk_prcmu_set_rate,
}; };
static struct clk_ops clk_prcmu_gate_ops = { static const struct clk_ops clk_prcmu_gate_ops = {
.prepare = clk_prcmu_prepare, .prepare = clk_prcmu_prepare,
.unprepare = clk_prcmu_unprepare, .unprepare = clk_prcmu_unprepare,
.is_prepared = clk_prcmu_is_prepared, .is_prepared = clk_prcmu_is_prepared,
...@@ -208,19 +208,19 @@ static struct clk_ops clk_prcmu_gate_ops = { ...@@ -208,19 +208,19 @@ static struct clk_ops clk_prcmu_gate_ops = {
.recalc_rate = clk_prcmu_recalc_rate, .recalc_rate = clk_prcmu_recalc_rate,
}; };
static struct clk_ops clk_prcmu_scalable_rate_ops = { static const struct clk_ops clk_prcmu_scalable_rate_ops = {
.is_enabled = clk_prcmu_is_enabled, .is_enabled = clk_prcmu_is_enabled,
.recalc_rate = clk_prcmu_recalc_rate, .recalc_rate = clk_prcmu_recalc_rate,
.round_rate = clk_prcmu_round_rate, .round_rate = clk_prcmu_round_rate,
.set_rate = clk_prcmu_set_rate, .set_rate = clk_prcmu_set_rate,
}; };
static struct clk_ops clk_prcmu_rate_ops = { static const struct clk_ops clk_prcmu_rate_ops = {
.is_enabled = clk_prcmu_is_enabled, .is_enabled = clk_prcmu_is_enabled,
.recalc_rate = clk_prcmu_recalc_rate, .recalc_rate = clk_prcmu_recalc_rate,
}; };
static struct clk_ops clk_prcmu_opp_gate_ops = { static const struct clk_ops clk_prcmu_opp_gate_ops = {
.prepare = clk_prcmu_opp_prepare, .prepare = clk_prcmu_opp_prepare,
.unprepare = clk_prcmu_opp_unprepare, .unprepare = clk_prcmu_opp_unprepare,
.is_prepared = clk_prcmu_is_prepared, .is_prepared = clk_prcmu_is_prepared,
...@@ -230,7 +230,7 @@ static struct clk_ops clk_prcmu_opp_gate_ops = { ...@@ -230,7 +230,7 @@ static struct clk_ops clk_prcmu_opp_gate_ops = {
.recalc_rate = clk_prcmu_recalc_rate, .recalc_rate = clk_prcmu_recalc_rate,
}; };
static struct clk_ops clk_prcmu_opp_volt_scalable_ops = { static const struct clk_ops clk_prcmu_opp_volt_scalable_ops = {
.prepare = clk_prcmu_opp_volt_prepare, .prepare = clk_prcmu_opp_volt_prepare,
.unprepare = clk_prcmu_opp_volt_unprepare, .unprepare = clk_prcmu_opp_volt_unprepare,
.is_prepared = clk_prcmu_is_prepared, .is_prepared = clk_prcmu_is_prepared,
...@@ -247,7 +247,7 @@ static struct clk *clk_reg_prcmu(const char *name, ...@@ -247,7 +247,7 @@ static struct clk *clk_reg_prcmu(const char *name,
u8 cg_sel, u8 cg_sel,
unsigned long rate, unsigned long rate,
unsigned long flags, unsigned long flags,
struct clk_ops *clk_prcmu_ops) const struct clk_ops *clk_prcmu_ops)
{ {
struct clk_prcmu *clk; struct clk_prcmu *clk;
struct clk_init_data clk_prcmu_init; struct clk_init_data clk_prcmu_init;
......
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