summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorMark Brown <broonie@opensource.wolfsonmicro.com>2012-06-27 13:23:10 (GMT)
committerMark Brown <broonie@opensource.wolfsonmicro.com>2012-07-03 19:28:33 (GMT)
commit79511ed3225a64f6b7fc749f4f9c1ed82f24f729 (patch)
treed800dbefea3fc15dde99d1ad6f024cfc63e441a7 /drivers
parent5260cd2bc97318b8477b1d1e99c5a2c53764135b (diff)
downloadlinux-79511ed3225a64f6b7fc749f4f9c1ed82f24f729.tar.xz
regulator: core: Allow fixed enable_time to be set in the regulator_desc
Many regulators have a fixed specification for their enable time. Allow this to be set in the regulator_desc as a number to save them having to implement an explicit operation. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/regulator/core.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/regulator/core.c b/drivers/regulator/core.c
index aa82c04..6e488aa 100644
--- a/drivers/regulator/core.c
+++ b/drivers/regulator/core.c
@@ -1189,7 +1189,7 @@ overflow_err:
static int _regulator_get_enable_time(struct regulator_dev *rdev)
{
if (!rdev->desc->ops->enable_time)
- return 0;
+ return rdev->desc->enable_time;
return rdev->desc->ops->enable_time(rdev);
}