clk: make clk_init_data const
Subsystems (2)
PATCH 1/1 clk: make clk_init_data const
Make these const as they are only stored in the init field of a clk_hw structure, which is const.
Signed-off-by Bhumika Goyal <[email protected]>
---
To test changes in clk-common.c, I compiled clk-atlas6.c and clk-prima2.c as it gets included in these two files.
drivers/clk/clk-twl6040.c | 2 +- drivers/clk/clk-wm831x.c | 6 ++-- drivers/clk/sirf/clk-atlas6.c | 2 +- drivers/clk/sirf/clk-atlas7.c | 18 +++++----- drivers/clk/sirf/clk-common.c | 80 +++++++++++++++++++++---------------------- drivers/clk/sirf/clk-prima2.c | 2 +- 6 files changed, 55 insertions(+), 55 deletions(-)
drivers/clk/clk-twl6040.c +1 -1
@@ -82,7 +82,7 @@ static unsigned long twl6040_pdmclk_recalc_rate(struct clk_hw *hw, .recalc_rate = twl6040_pdmclk_recalc_rate, }; -static struct clk_init_data twl6040_pdmclk_init = { +static const struct clk_init_data twl6040_pdmclk_init = { .name ="pdmclk" , .ops = &twl6040_pdmclk_ops, .flags =CLK_GET_RATE_NOCACHE ,
drivers/clk/clk-wm831x.c +3 -3
@@ -52,7 +52,7 @@ static unsigned long wm831x_xtal_recalc_rate(struct clk_hw *hw, .recalc_rate = wm831x_xtal_recalc_rate, }; -static struct clk_init_data wm831x_xtal_init = { +static const struct clk_init_data wm831x_xtal_init = { .name ="xtal" , .ops = &wm831x_xtal_ops, };
@@ -225,7 +225,7 @@ static u8 wm831x_fll_get_parent(struct clk_hw *hw) .get_parent = wm831x_fll_get_parent, }; -static struct clk_init_data wm831x_fll_init = { +static const struct clk_init_data wm831x_fll_init = { .name ="fll" , .ops = &wm831x_fll_ops, .parent_names = wm831x_fll_parents,
@@ -338,7 +338,7 @@ static int wm831x_clkout_set_parent(struct clk_hw *hw, u8 parent) .set_parent = wm831x_clkout_set_parent, }; -static struct clk_init_data wm831x_clkout_init = { +static const struct clk_init_data wm831x_clkout_init = { .name ="clkout" , .ops = &wm831x_clkout_ops, .parent_names = wm831x_clkout_parents,
drivers/clk/sirf/clk-atlas6.c +1 -1
@@ -42,7 +42,7 @@ }, }; -static struct clk_init_data clk_nand_init = { +static const struct clk_init_data clk_nand_init = { .name ="nand" , .ops = &dmn_ops, .parent_names = dmn_clk_parents,
drivers/clk/sirf/clk-atlas7.c +9 -9
@@ -392,7 +392,7 @@ static unsigned long pll_clk_recalc_rate(struct clk_hw *hw, "xin", }; -static struct clk_init_data clk_cpupll_init = { +static const struct clk_init_data clk_cpupll_init = { .name ="cpupll_vco" , .ops = &ab_pll_ops, .parent_names = pll_clk_parents,
@@ -406,7 +406,7 @@ static unsigned long pll_clk_recalc_rate(struct clk_hw *hw, }, }; -static struct clk_init_data clk_mempll_init = { +static const struct clk_init_data clk_mempll_init = { .name ="mempll_vco" , .ops = &ab_pll_ops, .parent_names = pll_clk_parents,
@@ -420,7 +420,7 @@ static unsigned long pll_clk_recalc_rate(struct clk_hw *hw, }, }; -static struct clk_init_data clk_sys0pll_init = { +static const struct clk_init_data clk_sys0pll_init = { .name ="sys0pll_vco" , .ops = &ab_pll_ops, .parent_names = pll_clk_parents,
@@ -434,7 +434,7 @@ static unsigned long pll_clk_recalc_rate(struct clk_hw *hw, }, }; -static struct clk_init_data clk_sys1pll_init = { +static const struct clk_init_data clk_sys1pll_init = { .name ="sys1pll_vco" , .ops = &ab_pll_ops, .parent_names = pll_clk_parents,
@@ -448,7 +448,7 @@ static unsigned long pll_clk_recalc_rate(struct clk_hw *hw, }, }; -static struct clk_init_data clk_sys2pll_init = { +static const struct clk_init_data clk_sys2pll_init = { .name ="sys2pll_vco" , .ops = &ab_pll_ops, .parent_names = pll_clk_parents,
@@ -462,7 +462,7 @@ static unsigned long pll_clk_recalc_rate(struct clk_hw *hw, }, }; -static struct clk_init_data clk_sys3pll_init = { +static const struct clk_init_data clk_sys3pll_init = { .name ="sys3pll_vco" , .ops = &ab_pll_ops, .parent_names = pll_clk_parents,
@@ -596,7 +596,7 @@ static int dto_clk_set_parent(struct clk_hw *hw, u8 index) "sys3pll_clk1", }; -static struct clk_init_data clk_audiodto_init = { +static const struct clk_init_data clk_audiodto_init = { .name ="audio_dto" , .ops = &dto_ops, .parent_names = audiodto_clk_parents,
@@ -617,7 +617,7 @@ static int dto_clk_set_parent(struct clk_hw *hw, u8 index) "sys3pll_clk1", }; -static struct clk_init_data clk_disp0dto_init = { +static const struct clk_init_data clk_disp0dto_init = { .name ="disp0_dto" , .ops = &dto_ops, .parent_names = disp0dto_clk_parents,
@@ -638,7 +638,7 @@ static int dto_clk_set_parent(struct clk_hw *hw, u8 index) "sys3pll_clk1", }; -static struct clk_init_data clk_disp1dto_init = { +static const struct clk_init_data clk_disp1dto_init = { .name ="disp1_dto" , .ops = &dto_ops, .parent_names = disp1dto_clk_parents,
drivers/clk/sirf/clk-common.c +40 -40
320 lines not on this page · raw message
drivers/clk/sirf/clk-prima2.c +1 -1
@@ -42,7 +42,7 @@ }, }; -static struct clk_init_data clk_nand_init = { +static const struct clk_init_data clk_nand_init = { .name ="nand" , .ops = &ios_ops, .parent_names = std_clk_io_parents,
Signature · 1 line
1.9.1
Stephen Boyd
AppliedQuoted 5 lines · Bhumika Goyal
Make these const as they are only stored in the init field of a
clk_hwstructure, which is const.Signed-off-by Bhumika Goyal <[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