]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
drivers-video-backlight-lp855x_blc-use-generic-pwm-functions-fix
authorAndrew Morton <akpm@linux-foundation.org>
Thu, 25 Oct 2012 01:15:02 +0000 (12:15 +1100)
committerStephen Rothwell <sfr@canb.auug.org.au>
Mon, 29 Oct 2012 03:17:28 +0000 (14:17 +1100)
coding-style simplification, per Thierry

Cc: "Kim, Milo" <Milo.Kim@ti.com>
Cc: Bryan Wu <bryan.wu@canonical.com>
Cc: Milo(Woogyom) Kim <milo.kim@ti.com>
Cc: Richard Purdie <rpurdie@rpsys.net>
Cc: Thierry Reding <thierry.reding@avionic-design.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
drivers/video/backlight/lp855x_bl.c

index c4fd72f2f383df4d0586ed047b916397e6ac5c9f..f6ad875b33f306a7687ed0405ec32e093927aa43 100644 (file)
@@ -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)