Skip to contentSkip to conversation

mfd: arizona: Fix typo using hard-coded register

PATCH RESEND Applied Charles Keepax 2 participants 2 messages Jun 6, 2017

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH RESEND 1/1 mfd: arizona: Fix typo using hard-coded register

A hardcoded register is accidentally used instead of the register address passed into the function. Correct this and use the appropriate variable. This would cause minor issues on wm5102, but all other devices using this driver would have been unaffected.

Fixes commit ef84f885e037 ("mfd: arizona: Refactor arizona_poll_reg")
---
 drivers/mfd/arizona-core.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
drivers/mfd/arizona-core.c +1 -2
index 75488e6..8d46e3a 100644
@@ -245,8 +245,7 @@ static int arizona_poll_reg(struct arizona *arizona,
 	int ret;
 
 	ret = regmap_read_poll_timeout(arizona->regmap,
-				       ARIZONA_INTERRUPT_RAW_STATUS_5, val,
-				       ((val & mask) == target),
+				       reg, val, ((val & mask) == target),
 				       ARIZONA_REG_POLL_DELAY_US,
 				       timeout_ms * 1000);
 	if (ret)
Signature · 1 line
2.1.4
Applied
#1 lore raw
Quoted 11 lines · Charles Keepax

A hardcoded register is accidentally used instead of the register address passed into the function. Correct this and use the appropriate variable. This would cause minor issues on wm5102, but all other devices using this driver would have been unaffected.

Fixes commit ef84f885e037 ("mfd: arizona: Refactor arizona_poll_reg")
---
 drivers/mfd/arizona-core.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

Applied, thanks.

Quoted 14 lines
drivers/mfd/arizona-core.c +1 -2
index 75488e6..8d46e3a 100644
@@ -245,8 +245,7 @@ static int arizona_poll_reg(struct arizona *arizona,
 	int ret;
 
 	ret = regmap_read_poll_timeout(arizona->regmap,
-				       ARIZONA_INTERRUPT_RAW_STATUS_5, val,
-				       ((val & mask) == target),
+				       reg, val, ((val & mask) == target),
 				       ARIZONA_REG_POLL_DELAY_US,
 				       timeout_ms * 1000);
 	if (ret)
Signature · 4 lines
Lee Jones
Linaro STMicroelectronics Landing Team Lead
Linaro.org │ Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog