Преглед изворни кода

mfd: menelaus: Use macro for magic number

Use macro to check a register bit.

Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
Aaro Koskinen пре 10 година
родитељ
комит
dfe514b67a
1 измењених фајлова са 1 додато и 1 уклоњено
  1. 1 1
      drivers/mfd/menelaus.c

+ 1 - 1
drivers/mfd/menelaus.c

@@ -1216,7 +1216,7 @@ static int menelaus_probe(struct i2c_client *client,
 	err = menelaus_read_reg(MENELAUS_VCORE_CTRL1);
 	if (err < 0)
 		goto fail;
-	if (err & BIT(7))
+	if (err & VCORE_CTRL1_HW_NSW)
 		menelaus->vcore_hw_mode = 1;
 	else
 		menelaus->vcore_hw_mode = 0;