aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/regulator/lp872x.c
diff options
context:
space:
mode:
authorMilo Kim <milo.kim@ti.com>2013-07-02 21:30:57 -0400
committerMark Brown <broonie@linaro.org>2013-07-15 06:22:03 -0400
commit37a6f43dd1924013cbf2eb91b74b3cc9818b3af8 (patch)
treef40c5963f1c0b410ea96d78aaa6487def4d35110 /drivers/regulator/lp872x.c
parentad81f0545ef01ea651886dddac4bef6cec930092 (diff)
regulator: lp872x: fix a build waring and coding styles
Fix a warning below. drivers/regulator/lp872x.c:910:33: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast] And checkpatch warnings are fixed. WARNING: space prohibited before semicolon Signed-off-by: Milo Kim <milo.kim@ti.com> Signed-off-by: Mark Brown <broonie@linaro.org>
Diffstat (limited to 'drivers/regulator/lp872x.c')
-rw-r--r--drivers/regulator/lp872x.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/drivers/regulator/lp872x.c b/drivers/regulator/lp872x.c
index b16336bcd4d4..1018fb2020a9 100644
--- a/drivers/regulator/lp872x.c
+++ b/drivers/regulator/lp872x.c
@@ -373,7 +373,7 @@ static int lp8725_buck_set_current_limit(struct regulator_dev *rdev,
373 return -EINVAL; 373 return -EINVAL;
374 } 374 }
375 375
376 for (i = ARRAY_SIZE(lp8725_buck_uA) - 1 ; i >= 0; i--) { 376 for (i = ARRAY_SIZE(lp8725_buck_uA) - 1; i >= 0; i--) {
377 if (lp8725_buck_uA[i] >= min_uA && 377 if (lp8725_buck_uA[i] >= min_uA &&
378 lp8725_buck_uA[i] <= max_uA) 378 lp8725_buck_uA[i] <= max_uA)
379 return lp872x_update_bits(lp, addr, 379 return lp872x_update_bits(lp, addr,
@@ -787,7 +787,7 @@ static int lp872x_regulator_register(struct lp872x *lp)
787 struct regulator_dev *rdev; 787 struct regulator_dev *rdev;
788 int i, ret; 788 int i, ret;
789 789
790 for (i = 0 ; i < lp->num_regulators ; i++) { 790 for (i = 0; i < lp->num_regulators; i++) {
791 desc = (lp->chipid == LP8720) ? &lp8720_regulator_desc[i] : 791 desc = (lp->chipid == LP8720) ? &lp8720_regulator_desc[i] :
792 &lp8725_regulator_desc[i]; 792 &lp8725_regulator_desc[i];
793 793
@@ -820,7 +820,7 @@ static void lp872x_regulator_unregister(struct lp872x *lp)
820 struct regulator_dev *rdev; 820 struct regulator_dev *rdev;
821 int i; 821 int i;
822 822
823 for (i = 0 ; i < lp->num_regulators ; i++) { 823 for (i = 0; i < lp->num_regulators; i++) {
824 rdev = *(lp->regulators + i); 824 rdev = *(lp->regulators + i);
825 regulator_unregister(rdev); 825 regulator_unregister(rdev);
826 } 826 }
@@ -907,7 +907,8 @@ static struct lp872x_platform_data
907 goto out; 907 goto out;
908 908
909 for (i = 0; i < num_matches; i++) { 909 for (i = 0; i < num_matches; i++) {
910 pdata->regulator_data[i].id = (int)match[i].driver_data; 910 pdata->regulator_data[i].id =
911 (enum lp872x_regulator_id)match[i].driver_data;
911 pdata->regulator_data[i].init_data = match[i].init_data; 912 pdata->regulator_data[i].init_data = match[i].init_data;
912 913
913 /* Operation mode configuration for buck/buck1/buck2 */ 914 /* Operation mode configuration for buck/buck1/buck2 */