From 5fed5a1650bf4b63fb05e3867d7b3788875640dd Mon Sep 17 00:00:00 2001 From: Andrew Morton Date: Fri, 9 Nov 2012 14:04:45 +1100 Subject: [PATCH] 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 --- drivers/video/backlight/lp855x_bl.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) 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) -- 2.39.5