diff options
author | Chao Xie <chao.xie@marvell.com> | 2014-10-31 03:13:41 +0100 |
---|---|---|
committer | Michael Turquette <mturquette@linaro.org> | 2014-11-13 01:33:22 +0100 |
commit | 2bd1e256e45052f2244403f822fd85aa64a6aa00 (patch) | |
tree | db8a3a795d63d39557b39bc8ca0da34fe1a2457d /drivers/clk/mmp/clk-frac.c | |
parent | Linux 3.18-rc4 (diff) | |
download | linux-2bd1e256e45052f2244403f822fd85aa64a6aa00.tar.xz linux-2bd1e256e45052f2244403f822fd85aa64a6aa00.zip |
clk: mmp: add prefix "mmp" for structures defined for clk-frac
The structures defined for clk-frac will be used out side
of clk-frac.c.
To avoid conflicts, add prefix "mmp" for these structures'
name.
Signed-off-by: Chao Xie <chao.xie@marvell.com>
Acked-by: Haojian Zhuang <haojian.zhuang@gmail.com>
Signed-off-by: Michael Turquette <mturquette@linaro.org>
Diffstat (limited to 'drivers/clk/mmp/clk-frac.c')
-rw-r--r-- | drivers/clk/mmp/clk-frac.c | 23 |
1 files changed, 12 insertions, 11 deletions
diff --git a/drivers/clk/mmp/clk-frac.c b/drivers/clk/mmp/clk-frac.c index 23a56f561812..3fbc9cab53a6 100644 --- a/drivers/clk/mmp/clk-frac.c +++ b/drivers/clk/mmp/clk-frac.c @@ -22,19 +22,19 @@ * numerator/denominator = Fin / (Fout * factor) */ -#define to_clk_factor(hw) container_of(hw, struct clk_factor, hw) -struct clk_factor { +#define to_clk_factor(hw) container_of(hw, struct mmp_clk_factor, hw) +struct mmp_clk_factor { struct clk_hw hw; void __iomem *base; - struct clk_factor_masks *masks; - struct clk_factor_tbl *ftbl; + struct mmp_clk_factor_masks *masks; + struct mmp_clk_factor_tbl *ftbl; unsigned int ftbl_cnt; }; static long clk_factor_round_rate(struct clk_hw *hw, unsigned long drate, unsigned long *prate) { - struct clk_factor *factor = to_clk_factor(hw); + struct mmp_clk_factor *factor = to_clk_factor(hw); unsigned long rate = 0, prev_rate; int i; @@ -58,8 +58,8 @@ static long clk_factor_round_rate(struct clk_hw *hw, unsigned long drate, static unsigned long clk_factor_recalc_rate(struct clk_hw *hw, unsigned long parent_rate) { - struct clk_factor *factor = to_clk_factor(hw); - struct clk_factor_masks *masks = factor->masks; + struct mmp_clk_factor *factor = to_clk_factor(hw); + struct mmp_clk_factor_masks *masks = factor->masks; unsigned int val, num, den; val = readl_relaxed(factor->base); @@ -81,8 +81,8 @@ static unsigned long clk_factor_recalc_rate(struct clk_hw *hw, static int clk_factor_set_rate(struct clk_hw *hw, unsigned long drate, unsigned long prate) { - struct clk_factor *factor = to_clk_factor(hw); - struct clk_factor_masks *masks = factor->masks; + struct mmp_clk_factor *factor = to_clk_factor(hw); + struct mmp_clk_factor_masks *masks = factor->masks; int i; unsigned long val; unsigned long prev_rate, rate = 0; @@ -118,10 +118,11 @@ static struct clk_ops clk_factor_ops = { struct clk *mmp_clk_register_factor(const char *name, const char *parent_name, unsigned long flags, void __iomem *base, - struct clk_factor_masks *masks, struct clk_factor_tbl *ftbl, + struct mmp_clk_factor_masks *masks, + struct mmp_clk_factor_tbl *ftbl, unsigned int ftbl_cnt) { - struct clk_factor *factor; + struct mmp_clk_factor *factor; struct clk_init_data init; struct clk *clk; |