diff options
Diffstat (limited to 'drivers/regulator/palmas-regulator.c')
-rw-r--r-- | drivers/regulator/palmas-regulator.c | 14 |
1 files changed, 5 insertions, 9 deletions
diff --git a/drivers/regulator/palmas-regulator.c b/drivers/regulator/palmas-regulator.c index c4435f608df7..795f75a6ac33 100644 --- a/drivers/regulator/palmas-regulator.c +++ b/drivers/regulator/palmas-regulator.c | |||
@@ -673,7 +673,9 @@ static __devinit int palmas_probe(struct platform_device *pdev) | |||
673 | pmic->desc[id].ops = &palmas_ops_smps10; | 673 | pmic->desc[id].ops = &palmas_ops_smps10; |
674 | pmic->desc[id].vsel_reg = PALMAS_SMPS10_CTRL; | 674 | pmic->desc[id].vsel_reg = PALMAS_SMPS10_CTRL; |
675 | pmic->desc[id].vsel_mask = SMPS10_VSEL; | 675 | pmic->desc[id].vsel_mask = SMPS10_VSEL; |
676 | pmic->desc[id].enable_reg = PALMAS_SMPS10_STATUS; | 676 | pmic->desc[id].enable_reg = |
677 | PALMAS_BASE_TO_REG(PALMAS_SMPS_BASE, | ||
678 | PALMAS_SMPS10_STATUS); | ||
677 | pmic->desc[id].enable_mask = SMPS10_BOOST_EN; | 679 | pmic->desc[id].enable_mask = SMPS10_BOOST_EN; |
678 | } | 680 | } |
679 | 681 | ||
@@ -739,7 +741,8 @@ static __devinit int palmas_probe(struct platform_device *pdev) | |||
739 | 741 | ||
740 | pmic->desc[id].type = REGULATOR_VOLTAGE; | 742 | pmic->desc[id].type = REGULATOR_VOLTAGE; |
741 | pmic->desc[id].owner = THIS_MODULE; | 743 | pmic->desc[id].owner = THIS_MODULE; |
742 | pmic->desc[id].enable_reg = palmas_regs_info[id].ctrl_addr; | 744 | pmic->desc[id].enable_reg = PALMAS_BASE_TO_REG(PALMAS_LDO_BASE, |
745 | palmas_regs_info[id].ctrl_addr); | ||
743 | pmic->desc[id].enable_mask = PALMAS_LDO1_CTRL_MODE_ACTIVE; | 746 | pmic->desc[id].enable_mask = PALMAS_LDO1_CTRL_MODE_ACTIVE; |
744 | 747 | ||
745 | if (pdata && pdata->reg_data) | 748 | if (pdata && pdata->reg_data) |
@@ -775,9 +778,6 @@ static __devinit int palmas_probe(struct platform_device *pdev) | |||
775 | err_unregister_regulator: | 778 | err_unregister_regulator: |
776 | while (--id >= 0) | 779 | while (--id >= 0) |
777 | regulator_unregister(pmic->rdev[id]); | 780 | regulator_unregister(pmic->rdev[id]); |
778 | kfree(pmic->rdev); | ||
779 | kfree(pmic->desc); | ||
780 | kfree(pmic); | ||
781 | return ret; | 781 | return ret; |
782 | } | 782 | } |
783 | 783 | ||
@@ -788,10 +788,6 @@ static int __devexit palmas_remove(struct platform_device *pdev) | |||
788 | 788 | ||
789 | for (id = 0; id < PALMAS_NUM_REGS; id++) | 789 | for (id = 0; id < PALMAS_NUM_REGS; id++) |
790 | regulator_unregister(pmic->rdev[id]); | 790 | regulator_unregister(pmic->rdev[id]); |
791 | |||
792 | kfree(pmic->rdev); | ||
793 | kfree(pmic->desc); | ||
794 | kfree(pmic); | ||
795 | return 0; | 791 | return 0; |
796 | } | 792 | } |
797 | 793 | ||