From: Andrew Morton Date: Fri, 9 Nov 2012 03:04:45 +0000 (+1100) Subject: drivers-video-backlight-lp855x_blc-use-generic-pwm-functions-fix X-Git-Tag: next-20121112~5^2~107 X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=5fed5a1650bf4b63fb05e3867d7b3788875640dd;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 c4fd72f2f383..f6ad875b33f3 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)