diff options
Diffstat (limited to 'drivers/regulator')
-rw-r--r-- | drivers/regulator/core.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/regulator/core.c b/drivers/regulator/core.c index d1d3a36dfc..ac4141c1cd 100644 --- a/drivers/regulator/core.c +++ b/drivers/regulator/core.c @@ -71,6 +71,11 @@ static int regulator_disable_internal(struct regulator_internal *ri) if (!ri->enable_count) return -EINVAL; + if (ri->enable_count > 1) { + ri->enable_count--; + return 0; + } + if (!ri->rdev->desc->ops->disable) return -ENOSYS; |