regulator: qpnp-regulator: Update boost regulator current limit reg address

Update the address used for the boost regulator current limit
register to reflect the correctly location in hardware.  The
proper address is 0x4A, not 0x40.

Change-Id: Ieefcd072858691940103664a2130a6c69341448f
Signed-off-by: David Collins <collinsd@codeaurora.org>
diff --git a/drivers/regulator/qpnp-regulator.c b/drivers/regulator/qpnp-regulator.c
index c2c9f78..44fdbc1 100644
--- a/drivers/regulator/qpnp-regulator.c
+++ b/drivers/regulator/qpnp-regulator.c
@@ -107,7 +107,7 @@
 };
 
 enum qpnp_boost_registers {
-	QPNP_BOOST_REG_CURRENT_LIMIT		= 0x40,
+	QPNP_BOOST_REG_CURRENT_LIMIT		= 0x4A,
 };
 
 /* Used for indexing into ctrl_reg.  These are offets from 0x40 */
@@ -118,10 +118,6 @@
 	QPNP_COMMON_IDX_ENABLE			= 6,
 };
 
-enum qpnp_boost_control_register_index {
-	QPNP_BOOST_IDX_CURRENT_LIMIT		= 0,
-};
-
 /* Common regulator control register layout */
 #define QPNP_COMMON_ENABLE_MASK			0x80
 #define QPNP_COMMON_ENABLE			0x80
@@ -1124,10 +1120,14 @@
 	if (type == QPNP_REGULATOR_LOGICAL_TYPE_BOOST
 		&& pdata->boost_current_limit
 			!= QPNP_BOOST_CURRENT_LIMIT_HW_DEFAULT) {
-		ctrl_reg[QPNP_BOOST_IDX_CURRENT_LIMIT] &=
-			~QPNP_BOOST_CURRENT_LIMIT_MASK;
-		ctrl_reg[QPNP_BOOST_IDX_CURRENT_LIMIT] |=
-		     pdata->boost_current_limit & QPNP_BOOST_CURRENT_LIMIT_MASK;
+		reg = pdata->boost_current_limit;
+		mask = QPNP_BOOST_CURRENT_LIMIT_MASK;
+		rc = qpnp_vreg_masked_read_write(vreg,
+			QPNP_BOOST_REG_CURRENT_LIMIT, reg, mask);
+		if (rc) {
+			vreg_err(vreg, "spmi write failed, rc=%d\n", rc);
+			return rc;
+		}
 	}
 
 	/* Write back any control register values that were modified. */