mfd: menelaus: Use macro for magic number
authorAaro Koskinen <aaro.koskinen@iki.fi>
Sat, 28 Mar 2015 20:45:37 +0000 (22:45 +0200)
committerLee Jones <lee.jones@linaro.org>
Mon, 30 Mar 2015 09:06:55 +0000 (10:06 +0100)
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>
drivers/mfd/menelaus.c

index 2b2dc1f6d2cab19cb54c557b26090e58cc31e9f1..3ac36f5ccd3e13ddc81b3801ff196ee815742790 100644 (file)
@@ -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;