regulator: core: increment open_count when regulator supply is set
When registering the regulator and setting supply for the regulator
then increment open_count to reflect correct number of users.
Signed-off-by: Laxman Dewangan <[email protected]>
Signed-off-by: Mark Brown <[email protected]>
diff --git a/drivers/regulator/core.c b/drivers/regulator/core.c
index f092588..b28221a 100644
--- a/drivers/regulator/core.c
+++ b/drivers/regulator/core.c
@@ -974,6 +974,7 @@
err = -ENOMEM;
return err;
}
+ supply_rdev->open_count++;
return 0;
}