diff options
| -rw-r--r-- | drivers/regulator/db8500-prcmu.c | 14 |
1 files changed, 3 insertions, 11 deletions
diff --git a/drivers/regulator/db8500-prcmu.c b/drivers/regulator/db8500-prcmu.c index e5f7b8fe51f4..2bb8f451cc06 100644 --- a/drivers/regulator/db8500-prcmu.c +++ b/drivers/regulator/db8500-prcmu.c | |||
| @@ -266,7 +266,7 @@ static struct regulator_ops db8500_regulator_switch_ops = { | |||
| 266 | * Regulator information | 266 | * Regulator information |
| 267 | */ | 267 | */ |
| 268 | static struct db8500_regulator_info | 268 | static struct db8500_regulator_info |
| 269 | db8500_regulator_info[DB8500_NUM_REGULATORS] = { | 269 | db8500_regulator_info[DB8500_NUM_REGULATORS] = { |
| 270 | [DB8500_REGULATOR_VAPE] = { | 270 | [DB8500_REGULATOR_VAPE] = { |
| 271 | .desc = { | 271 | .desc = { |
| 272 | .name = "db8500-vape", | 272 | .name = "db8500-vape", |
| @@ -492,11 +492,9 @@ static int __devinit db8500_regulator_probe(struct platform_device *pdev) | |||
| 492 | info->desc.name, err); | 492 | info->desc.name, err); |
| 493 | 493 | ||
| 494 | /* if failing, unregister all earlier regulators */ | 494 | /* if failing, unregister all earlier regulators */ |
| 495 | i--; | 495 | while (--i >= 0) { |
| 496 | while (i >= 0) { | ||
| 497 | info = &db8500_regulator_info[i]; | 496 | info = &db8500_regulator_info[i]; |
| 498 | regulator_unregister(info->rdev); | 497 | regulator_unregister(info->rdev); |
| 499 | i--; | ||
| 500 | } | 498 | } |
| 501 | return err; | 499 | return err; |
| 502 | } | 500 | } |
| @@ -536,13 +534,7 @@ static struct platform_driver db8500_regulator_driver = { | |||
| 536 | 534 | ||
| 537 | static int __init db8500_regulator_init(void) | 535 | static int __init db8500_regulator_init(void) |
| 538 | { | 536 | { |
| 539 | int ret; | 537 | return platform_driver_register(&db8500_regulator_driver); |
| 540 | |||
| 541 | ret = platform_driver_register(&db8500_regulator_driver); | ||
| 542 | if (ret < 0) | ||
| 543 | return -ENODEV; | ||
| 544 | |||
| 545 | return 0; | ||
| 546 | } | 538 | } |
| 547 | 539 | ||
| 548 | static void __exit db8500_regulator_exit(void) | 540 | static void __exit db8500_regulator_exit(void) |
