[media] lm3560: simplify boolean tests
authorMauro Carvalho Chehab <m.chehab@samsung.com>
Wed, 3 Sep 2014 18:28:27 +0000 (15:28 -0300)
committerMauro Carvalho Chehab <m.chehab@samsung.com>
Wed, 3 Sep 2014 20:59:24 +0000 (17:59 -0300)
Instead of using if (on == true), just use
if (on).

That allows a faster mental parsing when analyzing the
code.

Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
drivers/media/i2c/lm3560.c

index c23de593c17d5572ff2123403ad6e4e006d21e55..d9ece4b2d047067dc19921e1e79a52fd80ad130e 100644 (file)
@@ -100,14 +100,14 @@ static int lm3560_enable_ctrl(struct lm3560_flash *flash,
        int rval;
 
        if (led_no == LM3560_LED0) {
-               if (on == true)
+               if (on)
                        rval = regmap_update_bits(flash->regmap,
                                                  REG_ENABLE, 0x08, 0x08);
                else
                        rval = regmap_update_bits(flash->regmap,
                                                  REG_ENABLE, 0x08, 0x00);
        } else {
-               if (on == true)
+               if (on)
                        rval = regmap_update_bits(flash->regmap,
                                                  REG_ENABLE, 0x10, 0x10);
                else
This page took 0.046214 seconds and 5 git commands to generate.