regulator: core: Drop references on supply regulator when unregistering
Mark Brown
maintainerPATCH 1/1 regulator: core: Drop references on supply regulator when unregistering
From: Mark Brown <[email protected]>
Signed-off-by Mark Brown <[email protected]>
--- drivers/regulator/core.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-)
drivers/regulator/core.c +4 -1
@@ -3827,8 +3827,11 @@ void regulator_unregister(struct regulator_dev *rdev)if (rdev ==NULL )return ; -if (rdev->supply) +if (rdev->supply) { +while (rdev->use_count--) +regulator_disable (rdev->supply);regulator_put (rdev->supply); + }mutex_lock (®ulator_list_mutex);debugfs_remove_recursive (rdev->debugfs);flush_work (&rdev->disable_work.work);
Signature · 1 line
1.8.3.2