mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2025-01-13 04:06:37 +07:00
regulator: core: Drop references on supply regulator when unregistering
Signed-off-by: Mark Brown <broonie@linaro.org>
This commit is contained in:
parent
dc9ceed6a1
commit
891636ea27
@ -3740,8 +3740,11 @@ void regulator_unregister(struct regulator_dev *rdev)
|
|||||||
if (rdev == NULL)
|
if (rdev == NULL)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if (rdev->supply)
|
if (rdev->supply) {
|
||||||
|
while (rdev->use_count--)
|
||||||
|
regulator_disable(rdev->supply);
|
||||||
regulator_put(rdev->supply);
|
regulator_put(rdev->supply);
|
||||||
|
}
|
||||||
mutex_lock(®ulator_list_mutex);
|
mutex_lock(®ulator_list_mutex);
|
||||||
debugfs_remove_recursive(rdev->debugfs);
|
debugfs_remove_recursive(rdev->debugfs);
|
||||||
flush_work(&rdev->disable_work.work);
|
flush_work(&rdev->disable_work.work);
|
||||||
|
Loading…
Reference in New Issue
Block a user