提交 afb666d1 编写于 作者: M Mauro Carvalho Chehab

[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: NMauro Carvalho Chehab <m.chehab@samsung.com>
上级 5a7f7b79
......@@ -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
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册