Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Commit 89bee142 authored by Jack Pham's avatar Jack Pham
Browse files

usb: dwc3-msm: host_mode is not a boolean



The 'host_mode' member gets set to the value of
POWER_SUPPLY_PROP_SCOPE, which is not a boolean. In the
case of it being set to POWER_SUPPLY_SCOPE_DEVICE (which
has value 2), the code incorrectly assumes the controller
is in host mode. Fix the checks for host mode by doing
an explicit comparison with POWER_SUPPLY_SCOPE_SYSTEM rather
than a non-zero test. Also rename the variable to 'scope'
to be extra clear.

Change-Id: Id75b8bbc163faecccebdbed20b0689c52aa2b71e
CRs-Fixed: 564396
Reported-by: default avatarWesley Cheng <wcheng@codeaurora.org>
Signed-off-by: default avatarJack Pham <jackp@codeaurora.org>
parent 6e3630b5
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment