Convert the code to use clk_div_mask() helper instead of div_mask() macro.

Signed-off-by: Andy Shevchenko <andriy.shevche...@linux.intel.com>
---
 arch/arm/mach-imx/clk-fixup-div.c | 7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)

diff --git a/arch/arm/mach-imx/clk-fixup-div.c 
b/arch/arm/mach-imx/clk-fixup-div.c
index 21db020..da18171 100644
--- a/arch/arm/mach-imx/clk-fixup-div.c
+++ b/arch/arm/mach-imx/clk-fixup-div.c
@@ -16,7 +16,6 @@
 #include "clk.h"
 
 #define to_clk_div(_hw) container_of(_hw, struct clk_divider, hw)
-#define div_mask(d)    ((1 << (d->width)) - 1)
 
 /**
  * struct clk_fixup_div - imx integer fixup divider clock
@@ -70,13 +69,13 @@ static int clk_fixup_div_set_rate(struct clk_hw *hw, 
unsigned long rate,
        /* Zero based divider */
        value = divider - 1;
 
-       if (value > div_mask(div))
-               value = div_mask(div);
+       if (value > clk_div_mask(div))
+               value = clk_div_mask(div);
 
        spin_lock_irqsave(div->lock, flags);
 
        val = readl(div->reg);
-       val &= ~(div_mask(div) << div->shift);
+       val &= ~(clk_div_mask(div) << div->shift);
        val |= value << div->shift;
        fixup_div->fixup(&val);
        writel(val, div->reg);
-- 
2.1.4

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Reply via email to