aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMauro Carvalho Chehab <m.chehab@samsung.com>2014-09-03 14:28:27 -0400
committerMauro Carvalho Chehab <m.chehab@samsung.com>2014-09-03 16:59:24 -0400
commitafb666d1e7b0af5ec8f8b35b6f9d813d538c95e3 (patch)
tree5248e3653a766f7be7beb5de3f93b2b864a5b52f
parent5a7f7b79d80ee8ee9f54055f1ba56fae1644b4ec (diff)
[media] lm3560: simplify boolean tests
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>
-rw-r--r--drivers/media/i2c/lm3560.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/media/i2c/lm3560.c b/drivers/media/i2c/lm3560.c
index c23de593c17d..d9ece4b2d047 100644
--- a/drivers/media/i2c/lm3560.c
+++ b/drivers/media/i2c/lm3560.c
@@ -100,14 +100,14 @@ static int lm3560_enable_ctrl(struct lm3560_flash *flash,
100 int rval; 100 int rval;
101 101
102 if (led_no == LM3560_LED0) { 102 if (led_no == LM3560_LED0) {
103 if (on == true) 103 if (on)
104 rval = regmap_update_bits(flash->regmap, 104 rval = regmap_update_bits(flash->regmap,
105 REG_ENABLE, 0x08, 0x08); 105 REG_ENABLE, 0x08, 0x08);
106 else 106 else
107 rval = regmap_update_bits(flash->regmap, 107 rval = regmap_update_bits(flash->regmap,
108 REG_ENABLE, 0x08, 0x00); 108 REG_ENABLE, 0x08, 0x00);
109 } else { 109 } else {
110 if (on == true) 110 if (on)
111 rval = regmap_update_bits(flash->regmap, 111 rval = regmap_update_bits(flash->regmap,
112 REG_ENABLE, 0x10, 0x10); 112 REG_ENABLE, 0x10, 0x10);
113 else 113 else