aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/regulator
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/regulator')
-rw-r--r--drivers/regulator/core.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/regulator/core.c b/drivers/regulator/core.c
index c3f93b401e90..9da85bc21db4 100644
--- a/drivers/regulator/core.c
+++ b/drivers/regulator/core.c
@@ -1312,10 +1312,12 @@ static int _regulator_enable(struct regulator_dev *rdev)
1312 if (ret < 0) 1312 if (ret < 0)
1313 return ret; 1313 return ret;
1314 1314
1315 if (delay >= 1000) 1315 if (delay >= 1000) {
1316 mdelay(delay / 1000); 1316 mdelay(delay / 1000);
1317 else if (delay) 1317 udelay(delay % 1000);
1318 } else if (delay) {
1318 udelay(delay); 1319 udelay(delay);
1320 }
1319 1321
1320 } else if (ret < 0) { 1322 } else if (ret < 0) {
1321 printk(KERN_ERR "%s: is_enabled() failed for %s: %d\n", 1323 printk(KERN_ERR "%s: is_enabled() failed for %s: %d\n",