Browse Source

[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>
Mauro Carvalho Chehab 11 years ago
parent
commit
afb666d1e7
1 changed files with 2 additions and 2 deletions
  1. 2 2
      drivers/media/i2c/lm3560.c

+ 2 - 2
drivers/media/i2c/lm3560.c

@@ -100,14 +100,14 @@ static int lm3560_enable_ctrl(struct lm3560_flash *flash,
 	int rval;
 	int rval;
 
 
 	if (led_no == LM3560_LED0) {
 	if (led_no == LM3560_LED0) {
-		if (on == true)
+		if (on)
 			rval = regmap_update_bits(flash->regmap,
 			rval = regmap_update_bits(flash->regmap,
 						  REG_ENABLE, 0x08, 0x08);
 						  REG_ENABLE, 0x08, 0x08);
 		else
 		else
 			rval = regmap_update_bits(flash->regmap,
 			rval = regmap_update_bits(flash->regmap,
 						  REG_ENABLE, 0x08, 0x00);
 						  REG_ENABLE, 0x08, 0x00);
 	} else {
 	} else {
-		if (on == true)
+		if (on)
 			rval = regmap_update_bits(flash->regmap,
 			rval = regmap_update_bits(flash->regmap,
 						  REG_ENABLE, 0x10, 0x10);
 						  REG_ENABLE, 0x10, 0x10);
 		else
 		else