summaryrefslogtreecommitdiffstats
path: root/drivers/regulator/lp8755.c
diff options
context:
space:
mode:
authorAxel Lin <axel.lin@ingics.com>2013-01-26 13:19:47 +0800
committerMark Brown <broonie@opensource.wolfsonmicro.com>2013-01-27 11:00:25 +0800
commit1200c60bc599b8ad678617b0bd0e83bb7b4434ba (patch)
tree0c89de3677c18f746db2c16db0560cc3754c7bd9 /drivers/regulator/lp8755.c
parent510799eaba39251b9362cf00a11ad866846e9cbf (diff)
downloadlinux-1200c60bc599b8ad678617b0bd0e83bb7b4434ba.tar.bz2
regulator: lp8755: Use LP8755_BUCK_MAX instead of magic number
Signed-off-by: Axel Lin <axel.lin@ingics.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Diffstat (limited to 'drivers/regulator/lp8755.c')
-rw-r--r--drivers/regulator/lp8755.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/regulator/lp8755.c b/drivers/regulator/lp8755.c
index 8b1ce0f174b1..f0f6ea05065b 100644
--- a/drivers/regulator/lp8755.c
+++ b/drivers/regulator/lp8755.c
@@ -373,7 +373,7 @@ static irqreturn_t lp8755_irq_handler(int irq, void *data)
goto err_i2c;
/* sent power fault detection event to specific regulator */
- for (icnt = 0; icnt < 6; icnt++)
+ for (icnt = 0; icnt < LP8755_BUCK_MAX; icnt++)
if ((flag0 & (0x4 << icnt))
&& (pchip->irqmask & (0x04 << icnt))
&& (pchip->rdev[icnt] != NULL))
@@ -508,7 +508,7 @@ err_irq:
err_regulator:
/* output disable */
- for (icnt = 0; icnt < 0x06; icnt++)
+ for (icnt = 0; icnt < LP8755_BUCK_MAX; icnt++)
lp8755_write(pchip, icnt, 0x00);
return ret;
@@ -522,7 +522,7 @@ static int lp8755_remove(struct i2c_client *client)
for (icnt = 0; icnt < mphase_buck[pchip->mphase].nreg; icnt++)
regulator_unregister(pchip->rdev[icnt]);
- for (icnt = 0; icnt < 0x06; icnt++)
+ for (icnt = 0; icnt < LP8755_BUCK_MAX; icnt++)
lp8755_write(pchip, icnt, 0x00);
if (pchip->irq != 0)