aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/regulator
diff options
context:
space:
mode:
authorAxel Lin <axel.lin@gmail.com>2011-07-05 23:41:12 -0400
committerLiam Girdwood <lrg@slimlogic.co.uk>2011-07-08 14:14:57 -0400
commit90609503b71b6ec4aaf325c88de98da28740bc1d (patch)
tree6ebbfeaf4a870cc80a68fda601c4ab694e3a00c4 /drivers/regulator
parent6e0414a5c89c708efe67f828f3a9c12293ce326e (diff)
regulator: db8500-prcmu: small fixes
Small cleanups for better readability. Signed-off-by: Axel Lin <axel.lin@gmail.com> Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Signed-off-by: Liam Girdwood <lrg@slimlogic.co.uk>
Diffstat (limited to 'drivers/regulator')
-rw-r--r--drivers/regulator/db8500-prcmu.c14
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 */
268static struct db8500_regulator_info 268static struct db8500_regulator_info
269 db8500_regulator_info[DB8500_NUM_REGULATORS] = { 269db8500_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
537static int __init db8500_regulator_init(void) 535static 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
548static void __exit db8500_regulator_exit(void) 540static void __exit db8500_regulator_exit(void)