From: Andrew Morton Date: Thu, 29 Nov 2012 03:18:25 +0000 (+1100) Subject: drivers-video-backlight-lp855x_blc-use-generic-pwm-functions-fix X-Git-Tag: next-20121205~1^2~181 X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=a1f3696ff1876356787a546275e4f196a89777fc;p=karo-tx-linux.git drivers-video-backlight-lp855x_blc-use-generic-pwm-functions-fix coding-style simplification, per Thierry Cc: "Kim, Milo" Cc: Bryan Wu Cc: Milo(Woogyom) Kim Cc: Richard Purdie Cc: Thierry Reding Signed-off-by: Andrew Morton --- diff --git a/drivers/video/backlight/lp855x_bl.c b/drivers/video/backlight/lp855x_bl.c index 4361454246e7..b437541555ff 100644 --- a/drivers/video/backlight/lp855x_bl.c +++ b/drivers/video/backlight/lp855x_bl.c @@ -139,7 +139,10 @@ static void lp855x_pwm_ctrl(struct lp855x *lp, int br, int max_br) } pwm_config(lp->pwm, duty, period); - duty == 0 ? pwm_disable(lp->pwm) : pwm_enable(lp->pwm); + if (duty) + pwm_enable(lp->pwm); + else + pwm_disable(lp->pwm); } static int lp855x_bl_update_status(struct backlight_device *bl)