diff options
author | Axel Lin <axel.lin@ingics.com> | 2013-01-26 00:19:47 -0500 |
---|---|---|
committer | Mark Brown <broonie@opensource.wolfsonmicro.com> | 2013-01-26 22:00:25 -0500 |
commit | 1200c60bc599b8ad678617b0bd0e83bb7b4434ba (patch) | |
tree | 0c89de3677c18f746db2c16db0560cc3754c7bd9 /drivers/regulator | |
parent | 510799eaba39251b9362cf00a11ad866846e9cbf (diff) |
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')
-rw-r--r-- | drivers/regulator/lp8755.c | 6 |
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) | |||
373 | goto err_i2c; | 373 | goto err_i2c; |
374 | 374 | ||
375 | /* sent power fault detection event to specific regulator */ | 375 | /* sent power fault detection event to specific regulator */ |
376 | for (icnt = 0; icnt < 6; icnt++) | 376 | for (icnt = 0; icnt < LP8755_BUCK_MAX; icnt++) |
377 | if ((flag0 & (0x4 << icnt)) | 377 | if ((flag0 & (0x4 << icnt)) |
378 | && (pchip->irqmask & (0x04 << icnt)) | 378 | && (pchip->irqmask & (0x04 << icnt)) |
379 | && (pchip->rdev[icnt] != NULL)) | 379 | && (pchip->rdev[icnt] != NULL)) |
@@ -508,7 +508,7 @@ err_irq: | |||
508 | 508 | ||
509 | err_regulator: | 509 | err_regulator: |
510 | /* output disable */ | 510 | /* output disable */ |
511 | for (icnt = 0; icnt < 0x06; icnt++) | 511 | for (icnt = 0; icnt < LP8755_BUCK_MAX; icnt++) |
512 | lp8755_write(pchip, icnt, 0x00); | 512 | lp8755_write(pchip, icnt, 0x00); |
513 | 513 | ||
514 | return ret; | 514 | return ret; |
@@ -522,7 +522,7 @@ static int lp8755_remove(struct i2c_client *client) | |||
522 | for (icnt = 0; icnt < mphase_buck[pchip->mphase].nreg; icnt++) | 522 | for (icnt = 0; icnt < mphase_buck[pchip->mphase].nreg; icnt++) |
523 | regulator_unregister(pchip->rdev[icnt]); | 523 | regulator_unregister(pchip->rdev[icnt]); |
524 | 524 | ||
525 | for (icnt = 0; icnt < 0x06; icnt++) | 525 | for (icnt = 0; icnt < LP8755_BUCK_MAX; icnt++) |
526 | lp8755_write(pchip, icnt, 0x00); | 526 | lp8755_write(pchip, icnt, 0x00); |
527 | 527 | ||
528 | if (pchip->irq != 0) | 528 | if (pchip->irq != 0) |