projects
/
firefly-linux-kernel-4.4.55.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
5a7f7b7
)
[media] lm3560: simplify boolean tests
author
Mauro Carvalho Chehab
<m.chehab@samsung.com>
Wed, 3 Sep 2014 18:28:27 +0000
(15:28 -0300)
committer
Mauro 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
patch
|
blob
|
history
diff --git
a/drivers/media/i2c/lm3560.c
b/drivers/media/i2c/lm3560.c
index c23de593c17d5572ff2123403ad6e4e006d21e55..d9ece4b2d047067dc19921e1e79a52fd80ad130e 100644
(file)
--- 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,
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