constify ux500 clk_ops.
Subsystems (2)
cover constify ux500 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_prcc" is used to initialized clk_init_data. clk_init_data is working with const clk_ops. So make clk_reg_prcc non-const clk_ops argument as const.
Arvind Yadav (3):
[PATCH 1/3] clk: ux500: prcmu: constify clk_ops. [PATCH 2/3] clk: ux500: sysctrl: constify clk_ops. [PATCH 3/3] clk: ux500: prcc: constify clk_ops.
drivers/clk/ux500/clk-prcc.c | 6 +++--- drivers/clk/ux500/clk-prcmu.c | 14 +++++++------- drivers/clk/ux500/clk-sysctrl.c | 8 ++++---- 3 files changed, 14 insertions(+), 14 deletions(-)
Signature · 1 line
1.9.1
PATCH 1/3 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.
--- drivers/clk/ux500/clk-prcmu.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-)
drivers/clk/ux500/clk-prcmu.c +7 -7
@@ -186,7 +186,7 @@ static void clk_prcmu_opp_volt_unprepare(struct clk_hw *hw) 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, .unprepare = clk_prcmu_unprepare, .is_prepared = clk_prcmu_is_prepared,
@@ -198,7 +198,7 @@ static void clk_prcmu_opp_volt_unprepare(struct clk_hw *hw) .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, .unprepare = clk_prcmu_unprepare, .is_prepared = clk_prcmu_is_prepared,
@@ -208,19 +208,19 @@ static void clk_prcmu_opp_volt_unprepare(struct clk_hw *hw) .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, .recalc_rate = clk_prcmu_recalc_rate, .round_rate = clk_prcmu_round_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, .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, .unprepare = clk_prcmu_opp_unprepare, .is_prepared = clk_prcmu_is_prepared,
@@ -230,7 +230,7 @@ static void clk_prcmu_opp_volt_unprepare(struct clk_hw *hw) .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, .unprepare = clk_prcmu_opp_volt_unprepare, .is_prepared = clk_prcmu_is_prepared,
@@ -247,7 +247,7 @@ static struct clk *clk_reg_prcmu(const char *name,u8 cg_sel, unsigned long rate, unsigned long flags, - struct clk_ops *clk_prcmu_ops) + const struct clk_ops *clk_prcmu_ops) { struct clk_prcmu *clk;struct clk_init_data clk_prcmu_init;
Signature · 1 line
1.9.1
Stephen Boyd
AppliedRe: [PATCH 1/3] clk: ux500: prcmu: constify clk_ops.
Quoted 10 lines · Arvind Yadav
clk_opsare not supposed to change at runtime. All functions working withclk_opsprovided by <linux/clk-provider.h> work with constclk_ops. So mark the non-constclk_opsas const.Here, Function "
clk_reg_prcmu" is used to initializedclk_init_data.clk_init_datais working with constclk_ops. So makeclk_reg_prcmunon-constclk_opsargument as const.Signed-off-by Arvind Yadav <[email protected]>---
Applied to clk-next
Signature · 2 lines
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, a Linux Foundation Collaborative Project
PATCH 2/3 clk: ux500: sysctrl: constify clk_ops.
In reply to Arvind Yadavclk_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_sysctrl" is used to initialized clk_init_data. clk_init_data is working with const clk_ops. So make clk_reg_sysctrl non-const clk_ops argument as const.
--- drivers/clk/ux500/clk-sysctrl.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-)
drivers/clk/ux500/clk-sysctrl.c +4 -4
@@ -98,18 +98,18 @@ static u8 clk_sysctrl_get_parent(struct clk_hw *hw)return clk->parent_index; } -static struct clk_ops clk_sysctrl_gate_ops = { +static const struct clk_ops clk_sysctrl_gate_ops = { .prepare = clk_sysctrl_prepare, .unprepare = clk_sysctrl_unprepare, }; -static struct clk_ops clk_sysctrl_gate_fixed_rate_ops = { +static const struct clk_ops clk_sysctrl_gate_fixed_rate_ops = { .prepare = clk_sysctrl_prepare, .unprepare = clk_sysctrl_unprepare, .recalc_rate = clk_sysctrl_recalc_rate, }; -static struct clk_ops clk_sysctrl_set_parent_ops = { +static const struct clk_ops clk_sysctrl_set_parent_ops = { .set_parent = clk_sysctrl_set_parent, .get_parent = clk_sysctrl_get_parent, };
@@ -124,7 +124,7 @@ static struct clk *clk_reg_sysctrl(struct device *dev,unsigned long rate, unsigned long enable_delay_us, unsigned long flags, - struct clk_ops *clk_sysctrl_ops) + const struct clk_ops *clk_sysctrl_ops) { struct clk_sysctrl *clk;struct clk_init_data clk_sysctrl_init;
Signature · 1 line
1.9.1
Stephen Boyd
AppliedRe: [PATCH 2/3] clk: ux500: sysctrl: constify clk_ops.
Quoted 10 lines · Arvind Yadav
clk_opsare not supposed to change at runtime. All functions working withclk_opsprovided by <linux/clk-provider.h> work with constclk_ops. So mark the non-constclk_opsas const.Here, Function "
clk_reg_sysctrl" is used to initializedclk_init_data.clk_init_datais working with constclk_ops. So makeclk_reg_sysctrlnon-constclk_opsargument as const.Signed-off-by Arvind Yadav <[email protected]>---
Applied to clk-next
Signature · 2 lines
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, a Linux Foundation Collaborative Project
PATCH 3/3 clk: ux500: prcc: constify clk_ops.
In reply to Arvind Yadavclk_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_prcc" is used to initialized clk_init_data. clk_init_data is working with const clk_ops. So make clk_reg_prcc non-const clk_ops argument as const.
--- drivers/clk/ux500/clk-prcc.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)
drivers/clk/ux500/clk-prcc.c +3 -3
@@ -79,13 +79,13 @@ static int clk_prcc_is_enabled(struct clk_hw *hw)return clk->is_enabled; } -static struct clk_ops clk_prcc_pclk_ops = { +static const struct clk_ops clk_prcc_pclk_ops = { .enable = clk_prcc_pclk_enable, .disable = clk_prcc_pclk_disable, .is_enabled = clk_prcc_is_enabled, }; -static struct clk_ops clk_prcc_kclk_ops = { +static const struct clk_ops clk_prcc_kclk_ops = { .enable = clk_prcc_kclk_enable, .disable = clk_prcc_kclk_disable, .is_enabled = clk_prcc_is_enabled,
@@ -96,7 +96,7 @@ static struct clk *clk_reg_prcc(const char *name,resource_size_t phy_base, u32 cg_sel, unsigned long flags, - struct clk_ops *clk_prcc_ops) + const struct clk_ops *clk_prcc_ops) { struct clk_prcc *clk;struct clk_init_data clk_prcc_init;
Signature · 1 line
1.9.1
Stephen Boyd
AppliedRe: [PATCH 3/3] clk: ux500: prcc: constify clk_ops.
Quoted 10 lines · Arvind Yadav
clk_opsare not supposed to change at runtime. All functions working withclk_opsprovided by <linux/clk-provider.h> work with constclk_ops. So mark the non-constclk_opsas const.Here, Function "
clk_reg_prcc" is used to initializedclk_init_data.clk_init_datais working with constclk_ops. So makeclk_reg_prccnon-constclk_opsargument as const.Signed-off-by Arvind Yadav <[email protected]>---
Applied to clk-next
Signature · 2 lines
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, a Linux Foundation Collaborative Project
Quoted 13 lines · Arvind Yadav
clk_opsare not supposed to change at runtime. All functions working withclk_opsprovided by <linux/clk-provider.h> work with constclk_ops. So mark the non-constclk_opsas const.Here, Function "
clk_reg_prcc" is used to initializedclk_init_data.clk_init_datais working with constclk_ops. So makeclk_reg_prccnon-constclk_opsargument as const.Arvind Yadav (3):
[PATCH 1/3] clk: ux500: prcmu: constifyclk_ops. [PATCH 2/3] clk: ux500: sysctrl: constifyclk_ops. [PATCH 3/3] clk: ux500: prcc: constifyclk_ops.
Quoted 8 lines
drivers/clk/ux500/clk-prcc.c | 6 +++--- drivers/clk/ux500/clk-prcmu.c | 14 +++++++------- drivers/clk/ux500/clk-sysctrl.c | 8 ++++---- 3 files changed, 14 insertions(+), 14 deletions(-)--
1.9.1
Mike, Stephen, can you pick this up?
Kind regards
Uffe