summaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-pxa/pwm.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/arm/mach-pxa/pwm.c')
-rw-r--r--arch/arm/mach-pxa/pwm.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/arm/mach-pxa/pwm.c b/arch/arm/mach-pxa/pwm.c
index 316cd98..74e2ead 100644
--- a/arch/arm/mach-pxa/pwm.c
+++ b/arch/arm/mach-pxa/pwm.c
@@ -60,7 +60,7 @@ int pwm_config(struct pwm_device *pwm, int duty_ns, int period_ns)
do_div(c, 1000000000);
period_cycles = c;
- if (period_cycles < 0)
+ if (period_cycles < 1)
period_cycles = 1;
prescale = (period_cycles - 1) / 1024;
pv = period_cycles / (prescale + 1) - 1;
OpenPOWER on IntegriCloud