summaryrefslogtreecommitdiffstats
path: root/drivers/power
diff options
context:
space:
mode:
authorHans de Goede <hdegoede@redhat.com>2015-10-03 16:13:19 +0200
committerHans de Goede <hdegoede@redhat.com>2015-10-20 18:40:27 +0200
commit03f8ae37194f5c2269ebb41236580cf37d090be0 (patch)
tree57c05361ac18b60bf3883667bf710d9639ef88cc /drivers/power
parent30490b528bafb0298f2fb76a3ed15194e220ba1f (diff)
downloadblackbird-obmc-uboot-03f8ae37194f5c2269ebb41236580cf37d090be0.tar.gz
blackbird-obmc-uboot-03f8ae37194f5c2269ebb41236580cf37d090be0.zip
sunxi: power: Drop protection against multiple calls from axp221 axp_init()
The only thing axp221.c's axp_init() does which needs protection against multiple calls is calling pmic_bus_init, and pmic_bus_init() itself is already protected against being called multiple times. Signed-off-by: Hans de Goede <hdegoede@redhat.com> Acked-by: Ian Campbell <ijc@hellion.org.uk>
Diffstat (limited to 'drivers/power')
-rw-r--r--drivers/power/axp221.c6
1 files changed, 0 insertions, 6 deletions
diff --git a/drivers/power/axp221.c b/drivers/power/axp221.c
index d621f2a9f9..65802e4a71 100644
--- a/drivers/power/axp221.c
+++ b/drivers/power/axp221.c
@@ -269,14 +269,9 @@ int axp_set_eldo(int eldo_num, unsigned int mvolt)
int axp_init(void)
{
- /* This cannot be 0 because it is used in SPL before BSS is ready */
- static int needs_init = 1;
u8 axp_chip_id;
int ret;
- if (!needs_init)
- return 0;
-
ret = pmic_bus_init();
if (ret)
return ret;
@@ -288,7 +283,6 @@ int axp_init(void)
if (!(axp_chip_id == 0x6 || axp_chip_id == 0x7 || axp_chip_id == 0x17))
return -ENODEV;
- needs_init = 0;
return 0;
}
OpenPOWER on IntegriCloud