summaryrefslogtreecommitdiff
path: root/arch/avr32/cpu/at32ap700x/clk.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/avr32/cpu/at32ap700x/clk.c')
-rw-r--r--arch/avr32/cpu/at32ap700x/clk.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/avr32/cpu/at32ap700x/clk.c b/arch/avr32/cpu/at32ap700x/clk.c
index d5dbe3b908..0fc6088e3e 100644
--- a/arch/avr32/cpu/at32ap700x/clk.c
+++ b/arch/avr32/cpu/at32ap700x/clk.c
@@ -72,7 +72,7 @@ unsigned long __gclk_set_rate(unsigned int id, enum gclk_parent parent,
sm_writel(PM_GCCTRL(id), parent | SM_BIT(CEN));
rate = parent_rate;
} else {
- divider = min(255, divider / 2 - 1);
+ divider = min(255UL, divider / 2 - 1);
sm_writel(PM_GCCTRL(id), parent | SM_BIT(CEN) | SM_BIT(DIVEN)
| SM_BF(DIV, divider));
rate = parent_rate / (2 * (divider + 1));