clk: add "const" for clk_ops of basic clks
authorShawn Guo <shawn.guo@linaro.org>
Tue, 27 Mar 2012 07:23:22 +0000 (15:23 +0800)
committerMike Turquette <mturquette@linaro.org>
Tue, 24 Apr 2012 23:37:38 +0000 (16:37 -0700)
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>
drivers/clk/clk-divider.c
drivers/clk/clk-fixed-rate.c
drivers/clk/clk-gate.c
drivers/clk/clk-mux.c
include/linux/clk-private.h

index 231cd6e890030d6a5587782af1ff328286f34e33..b1c4b02aaaf11a1e1cf51dcbb4eef0234c03e3b7 100644 (file)
@@ -146,7 +146,7 @@ static int clk_divider_set_rate(struct clk_hw *hw, unsigned long rate)
        return 0;
 }
 
-struct clk_ops clk_divider_ops = {
+const struct clk_ops clk_divider_ops = {
        .recalc_rate = clk_divider_recalc_rate,
        .round_rate = clk_divider_round_rate,
        .set_rate = clk_divider_set_rate,
index 651b06f49e15ae19f1722fc921fd0b832ddcb4c3..027e47704de91910f80dbabb3af68b7e413ab9c5 100644 (file)
@@ -33,7 +33,7 @@ static unsigned long clk_fixed_rate_recalc_rate(struct clk_hw *hw,
        return to_clk_fixed_rate(hw)->fixed_rate;
 }
 
-struct clk_ops clk_fixed_rate_ops = {
+const struct clk_ops clk_fixed_rate_ops = {
        .recalc_rate = clk_fixed_rate_recalc_rate,
 };
 EXPORT_SYMBOL_GPL(clk_fixed_rate_ops);
index b688f4775859500a6150402ce80ecdfd5dfab5b4..fe2ff9e774c289604aabb45552d2706b57a0ebfa 100644 (file)
@@ -98,7 +98,7 @@ static int clk_gate_is_enabled(struct clk_hw *hw)
        return reg ? 1 : 0;
 }
 
-struct clk_ops clk_gate_ops = {
+const struct clk_ops clk_gate_ops = {
        .enable = clk_gate_enable,
        .disable = clk_gate_disable,
        .is_enabled = clk_gate_is_enabled,
index 45cad61600c916bccf80877e70de026ef1c292f6..54244889a9487c48dced8fbb3901a42fe187d05e 100644 (file)
@@ -82,7 +82,7 @@ static int clk_mux_set_parent(struct clk_hw *hw, u8 index)
        return 0;
 }
 
-struct clk_ops clk_mux_ops = {
+const struct clk_ops clk_mux_ops = {
        .get_parent = clk_mux_get_parent,
        .set_parent = clk_mux_set_parent,
 };
index 5e4312b6f5ccb1072273ce94e235874c74dd852d..5f4ccd7cd761baacb8530f7a83b32b2b314bf4e2 100644 (file)
@@ -55,7 +55,7 @@ struct clk {
  * alternative macro for static initialization
  */
 
-extern struct clk_ops clk_fixed_rate_ops;
+extern const struct clk_ops clk_fixed_rate_ops;
 
 #define DEFINE_CLK_FIXED_RATE(_name, _flags, _rate,            \
                                _fixed_rate_flags)              \
@@ -78,7 +78,7 @@ extern struct clk_ops clk_fixed_rate_ops;
                .flags = _flags,                                \
        };
 
-extern struct clk_ops clk_gate_ops;
+extern const struct clk_ops clk_gate_ops;
 
 #define DEFINE_CLK_GATE(_name, _parent_name, _parent_ptr,      \
                                _flags, _reg, _bit_idx,         \
@@ -110,7 +110,7 @@ extern struct clk_ops clk_gate_ops;
                .flags = _flags,                                \
        };
 
-extern struct clk_ops clk_divider_ops;
+extern const struct clk_ops clk_divider_ops;
 
 #define DEFINE_CLK_DIVIDER(_name, _parent_name, _parent_ptr,   \
                                _flags, _reg, _shift, _width,   \
@@ -143,7 +143,7 @@ extern struct clk_ops clk_divider_ops;
                .flags = _flags,                                \
        };
 
-extern struct clk_ops clk_mux_ops;
+extern const struct clk_ops clk_mux_ops;
 
 #define DEFINE_CLK_MUX(_name, _parent_names, _parents, _flags, \
                                _reg, _shift, _width,           \
This page took 0.031996 seconds and 5 git commands to generate.