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

Commit 50f4f40a authored by Subbaraman Narayanamurthy's avatar Subbaraman Narayanamurthy Committed by Gerrit - the friendly Code Review server
Browse files

power: qpnp-smbcharger: handle the regulator probe deferral properly



Currently, if regulator_register() of smbcharger-external-otg
regulator returns an error (e.g. -EPROBE_DEFER),
regulator_unregister() is not called for smbcharger-boost-otg
regulator which got registered before that.

This causes problems during bootup later because of an invalid
regulator device being left registered indefinitely.

Fix this by changing the driver to use devm_regulator_register()
for registering the regulators. This fixes the issue by taking
care of unregistering the regulators automatically. Since this
eliminates the need for smbchg_regulator_deinit() in charger
driver, remove it.

CRs-Fixed: 895622
Change-Id: I363693888f357555dbb82ef2566ed855cea9fe94
Signed-off-by: default avatarSubbaraman Narayanamurthy <subbaram@codeaurora.org>
parent de1cb946
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