aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/clk/sunxi/clk-factors.c
diff options
context:
space:
mode:
authorChen-Yu Tsai <wens@csie.org>2016-01-25 21:15:38 +0800
committerMaxime Ripard <maxime.ripard@free-electrons.com>2016-01-27 16:50:38 +0100
commitb3e919e03ce84d9768c0e1c12066f502c5bbd485 (patch)
tree445f6bb02820f560cc2cc2515c1caf8ca8287d96 /drivers/clk/sunxi/clk-factors.c
parentclk: sunxi: usb: Sort clk providers by chip family and name (diff)
downloadlinux-dev-b3e919e03ce84d9768c0e1c12066f502c5bbd485.tar.xz
linux-dev-b3e919e03ce84d9768c0e1c12066f502c5bbd485.zip
clk: sunxi: factors: Make struct clk_factors_config table const
struct clk_factors_config contains shifts/widths for the factors of the factors clk. This is used to read out the factors from the register value. In no case is it written to, so make it const. Signed-off-by: Chen-Yu Tsai <wens@csie.org> Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
Diffstat (limited to 'drivers/clk/sunxi/clk-factors.c')
-rw-r--r--drivers/clk/sunxi/clk-factors.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/clk/sunxi/clk-factors.c b/drivers/clk/sunxi/clk-factors.c
index 59428dbd607a..928c079da193 100644
--- a/drivers/clk/sunxi/clk-factors.c
+++ b/drivers/clk/sunxi/clk-factors.c
@@ -48,7 +48,7 @@ static unsigned long clk_factors_recalc_rate(struct clk_hw *hw,
u32 reg;
unsigned long rate;
struct clk_factors *factors = to_clk_factors(hw);
- struct clk_factors_config *config = factors->config;
+ const struct clk_factors_config *config = factors->config;
/* Fetch the register value */
reg = readl(factors->reg);
@@ -123,7 +123,7 @@ static int clk_factors_set_rate(struct clk_hw *hw, unsigned long rate,
u8 n = 0, k = 0, m = 0, p = 0;
u32 reg;
struct clk_factors *factors = to_clk_factors(hw);
- struct clk_factors_config *config = factors->config;
+ const struct clk_factors_config *config = factors->config;
unsigned long flags = 0;
factors->get_factors((u32 *)&rate, (u32)parent_rate, &n, &k, &m, &p);