summaryrefslogtreecommitdiff
path: root/drivers/usb
diff options
context:
space:
mode:
authorLinux Build Service Account <lnxbuild@localhost>2016-09-10 06:39:12 -0700
committerGerrit - the friendly Code Review server <code-review@localhost>2016-09-10 06:39:12 -0700
commit6595d9c1cd72ad8e0eb3bfdb767d56884ffb8bb3 (patch)
tree299259ac5597148a49fdb9b5564c9fd4ce901ef4 /drivers/usb
parent1acb54a652e91435862e149aadebe62f32945fba (diff)
parentabc22dbb3577fdb1e7f13b8c9f4887b500db6ca8 (diff)
Merge "usb: pd: Fix unbalanced vconn regulator disable"
Diffstat (limited to 'drivers/usb')
-rw-r--r--drivers/usb/pd/policy_engine.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/drivers/usb/pd/policy_engine.c b/drivers/usb/pd/policy_engine.c
index b011efe189e7..1bb7082be8e6 100644
--- a/drivers/usb/pd/policy_engine.c
+++ b/drivers/usb/pd/policy_engine.c
@@ -1257,8 +1257,11 @@ static void usbpd_sm(struct work_struct *w)
POWER_SUPPLY_PROP_PD_ACTIVE, &val);
if (pd->current_pr == PR_SRC) {
- regulator_disable(pd->vconn);
regulator_disable(pd->vbus);
+ if (pd->vconn_enabled) {
+ regulator_disable(pd->vconn);
+ pd->vconn_enabled = false;
+ }
}
if (pd->current_dr == DR_UFP)