aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorShawn Guo <shawn.guo@linaro.org>2012-03-27 03:23:22 -0400
committerMike Turquette <mturquette@linaro.org>2012-04-24 19:37:38 -0400
commit822c250e154cd44cf60a4f0d647aa70abea09520 (patch)
treee23420400357585a3ab0cdbacd2c8d8b9605efd2
parentc0d2530c03cbf3741cb7a0f8ebae93e7a563fc58 (diff)
clk: add "const" for clk_ops of basic clks
The clk_ops of basic clks should have "const" to match the definition in "struct clk" and clk_register prototype. Signed-off-by: Shawn Guo <shawn.guo@linaro.org> Signed-off-by: Mike Turquette <mturquette@linaro.org>
-rw-r--r--drivers/clk/clk-divider.c2
-rw-r--r--drivers/clk/clk-fixed-rate.c2
-rw-r--r--drivers/clk/clk-gate.c2
-rw-r--r--drivers/clk/clk-mux.c2
-rw-r--r--include/linux/clk-private.h8
5 files changed, 8 insertions, 8 deletions
diff --git a/drivers/clk/clk-divider.c b/drivers/clk/clk-divider.c
index 231cd6e89003..b1c4b02aaaf1 100644
--- a/drivers/clk/clk-divider.c
+++ b/drivers/clk/clk-divider.c
@@ -146,7 +146,7 @@ static int clk_divider_set_rate(struct clk_hw *hw, unsigned long rate)
146 return 0; 146 return 0;
147} 147}
148 148
149struct clk_ops clk_divider_ops = { 149const struct clk_ops clk_divider_ops = {
150 .recalc_rate = clk_divider_recalc_rate, 150 .recalc_rate = clk_divider_recalc_rate,
151 .round_rate = clk_divider_round_rate, 151 .round_rate = clk_divider_round_rate,
152 .set_rate = clk_divider_set_rate, 152 .set_rate = clk_divider_set_rate,
diff --git a/drivers/clk/clk-fixed-rate.c b/drivers/clk/clk-fixed-rate.c
index 651b06f49e15..027e47704de9 100644
--- a/drivers/clk/clk-fixed-rate.c
+++ b/drivers/clk/clk-fixed-rate.c
@@ -33,7 +33,7 @@ static unsigned long clk_fixed_rate_recalc_rate(struct clk_hw *hw,
33 return to_clk_fixed_rate(hw)->fixed_rate; 33 return to_clk_fixed_rate(hw)->fixed_rate;
34} 34}
35 35
36struct clk_ops clk_fixed_rate_ops = { 36const struct clk_ops clk_fixed_rate_ops = {
37 .recalc_rate = clk_fixed_rate_recalc_rate, 37 .recalc_rate = clk_fixed_rate_recalc_rate,
38}; 38};
39EXPORT_SYMBOL_GPL(clk_fixed_rate_ops); 39EXPORT_SYMBOL_GPL(clk_fixed_rate_ops);
diff --git a/drivers/clk/clk-gate.c b/drivers/clk/clk-gate.c
index b688f4775859..fe2ff9e774c2 100644
--- a/drivers/clk/clk-gate.c
+++ b/drivers/clk/clk-gate.c
@@ -98,7 +98,7 @@ static int clk_gate_is_enabled(struct clk_hw *hw)
98 return reg ? 1 : 0; 98 return reg ? 1 : 0;
99} 99}
100 100
101struct clk_ops clk_gate_ops = { 101const struct clk_ops clk_gate_ops = {
102 .enable = clk_gate_enable, 102 .enable = clk_gate_enable,
103 .disable = clk_gate_disable, 103 .disable = clk_gate_disable,
104 .is_enabled = clk_gate_is_enabled, 104 .is_enabled = clk_gate_is_enabled,
diff --git a/drivers/clk/clk-mux.c b/drivers/clk/clk-mux.c
index 45cad61600c9..54244889a948 100644
--- a/drivers/clk/clk-mux.c
+++ b/drivers/clk/clk-mux.c
@@ -82,7 +82,7 @@ static int clk_mux_set_parent(struct clk_hw *hw, u8 index)
82 return 0; 82 return 0;
83} 83}
84 84
85struct clk_ops clk_mux_ops = { 85const struct clk_ops clk_mux_ops = {
86 .get_parent = clk_mux_get_parent, 86 .get_parent = clk_mux_get_parent,
87 .set_parent = clk_mux_set_parent, 87 .set_parent = clk_mux_set_parent,
88}; 88};
diff --git a/include/linux/clk-private.h b/include/linux/clk-private.h
index 5e4312b6f5cc..5f4ccd7cd761 100644
--- a/include/linux/clk-private.h
+++ b/include/linux/clk-private.h
@@ -55,7 +55,7 @@ struct clk {
55 * alternative macro for static initialization 55 * alternative macro for static initialization
56 */ 56 */
57 57
58extern struct clk_ops clk_fixed_rate_ops; 58extern const struct clk_ops clk_fixed_rate_ops;
59 59
60#define DEFINE_CLK_FIXED_RATE(_name, _flags, _rate, \ 60#define DEFINE_CLK_FIXED_RATE(_name, _flags, _rate, \
61 _fixed_rate_flags) \ 61 _fixed_rate_flags) \
@@ -78,7 +78,7 @@ extern struct clk_ops clk_fixed_rate_ops;
78 .flags = _flags, \ 78 .flags = _flags, \
79 }; 79 };
80 80
81extern struct clk_ops clk_gate_ops; 81extern const struct clk_ops clk_gate_ops;
82 82
83#define DEFINE_CLK_GATE(_name, _parent_name, _parent_ptr, \ 83#define DEFINE_CLK_GATE(_name, _parent_name, _parent_ptr, \
84 _flags, _reg, _bit_idx, \ 84 _flags, _reg, _bit_idx, \
@@ -110,7 +110,7 @@ extern struct clk_ops clk_gate_ops;
110 .flags = _flags, \ 110 .flags = _flags, \
111 }; 111 };
112 112
113extern struct clk_ops clk_divider_ops; 113extern const struct clk_ops clk_divider_ops;
114 114
115#define DEFINE_CLK_DIVIDER(_name, _parent_name, _parent_ptr, \ 115#define DEFINE_CLK_DIVIDER(_name, _parent_name, _parent_ptr, \
116 _flags, _reg, _shift, _width, \ 116 _flags, _reg, _shift, _width, \
@@ -143,7 +143,7 @@ extern struct clk_ops clk_divider_ops;
143 .flags = _flags, \ 143 .flags = _flags, \
144 }; 144 };
145 145
146extern struct clk_ops clk_mux_ops; 146extern const struct clk_ops clk_mux_ops;
147 147
148#define DEFINE_CLK_MUX(_name, _parent_names, _parents, _flags, \ 148#define DEFINE_CLK_MUX(_name, _parent_names, _parents, _flags, \
149 _reg, _shift, _width, \ 149 _reg, _shift, _width, \