aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/pwm/pwm-imx27.c')
-rw-r--r--drivers/pwm/pwm-imx27.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/pwm/pwm-imx27.c b/drivers/pwm/pwm-imx27.c
index c50d453552bd..86bcafd23e4f 100644
--- a/drivers/pwm/pwm-imx27.c
+++ b/drivers/pwm/pwm-imx27.c
@@ -235,8 +235,9 @@ static int pwm_imx27_apply(struct pwm_chip *chip, struct pwm_device *pwm,
235 235
236 period_cycles /= prescale; 236 period_cycles /= prescale;
237 c = clkrate * state->duty_cycle; 237 c = clkrate * state->duty_cycle;
238 do_div(c, NSEC_PER_SEC * prescale); 238 do_div(c, NSEC_PER_SEC);
239 duty_cycles = c; 239 duty_cycles = c;
240 duty_cycles /= prescale;
240 241
241 /* 242 /*
242 * according to imx pwm RM, the real period value should be PERIOD 243 * according to imx pwm RM, the real period value should be PERIOD