diff mbox

[7/7] mfd: menelaus: use macro for magic number

Message ID 1419702779-16001-8-git-send-email-aaro.koskinen@iki.fi (mailing list archive)
State New, archived
Headers show

Commit Message

Aaro Koskinen Dec. 27, 2014, 5:52 p.m. UTC
Use macro to check a register bit.

Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi>
---
 drivers/mfd/menelaus.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Lee Jones Jan. 20, 2015, 2:01 p.m. UTC | #1
On Sat, 27 Dec 2014, Aaro Koskinen wrote:

> Use macro to check a register bit.
> 
> Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi>
> ---
>  drivers/mfd/menelaus.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)

Applied, thanks.

> diff --git a/drivers/mfd/menelaus.c b/drivers/mfd/menelaus.c
> index 8660adf..05bae40 100644
> --- a/drivers/mfd/menelaus.c
> +++ b/drivers/mfd/menelaus.c
> @@ -1242,7 +1242,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;
diff mbox

Patch

diff --git a/drivers/mfd/menelaus.c b/drivers/mfd/menelaus.c
index 8660adf..05bae40 100644
--- a/drivers/mfd/menelaus.c
+++ b/drivers/mfd/menelaus.c
@@ -1242,7 +1242,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;