pwm: sanity check values before passing them to the drivers
Check for valid period size before calling ops->config. This fixes
the pxa driver which otherwise does a division by zero. While at
it, also check for duty_ns being smaller or equal to period_ns.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Cc: Robert Jarzmik <robert.jarzmik@free.fr>
1 parent ab8a576 commit f043520c5abe7627168af77b2c4b2992c4679e3a
@Sascha Hauer Sascha Hauer authored on 7 Apr 2013
Showing 1 changed file
View
drivers/pwm/core.c