* [PATCH] regulator: core: fix build warning
@ 2015-10-07 11:54 Sudip Mukherjee
2015-10-07 13:56 ` Mark Brown
0 siblings, 1 reply; 2+ messages in thread
From: Sudip Mukherjee @ 2015-10-07 11:54 UTC (permalink / raw)
To: Liam Girdwood, Mark Brown; +Cc: linux-kernel, Sudip Mukherjee
We were getting warning about:
warning: 'regulator_lock_supply' defined but not used
warning: 'regulator_unlock_supply' defined but not used
It appears that there is no user of regulator_lock_supply() and
regulator_unlock_supply().
Commit 9f01cd4a915e ("regulator: core: introduce function to lock
regulators and its supplies") says there will be future users, but as of
now there is no user and is creating build warnings.
Signed-off-by: Sudip Mukherjee <sudip@vectorindia.org>
---
drivers/regulator/core.c | 39 ---------------------------------------
1 file changed, 39 deletions(-)
diff --git a/drivers/regulator/core.c b/drivers/regulator/core.c
index 7896ef5..3ba7131 100644
--- a/drivers/regulator/core.c
+++ b/drivers/regulator/core.c
@@ -133,45 +133,6 @@ static bool have_full_constraints(void)
}
/**
- * regulator_lock_supply - lock a regulator and its supplies
- * @rdev: regulator source
- */
-static void regulator_lock_supply(struct regulator_dev *rdev)
-{
- struct regulator *supply;
- int i = 0;
-
- while (1) {
- mutex_lock_nested(&rdev->mutex, i++);
- supply = rdev->supply;
-
- if (!rdev->supply)
- return;
-
- rdev = supply->rdev;
- }
-}
-
-/**
- * regulator_unlock_supply - unlock a regulator and its supplies
- * @rdev: regulator source
- */
-static void regulator_unlock_supply(struct regulator_dev *rdev)
-{
- struct regulator *supply;
-
- while (1) {
- mutex_unlock(&rdev->mutex);
- supply = rdev->supply;
-
- if (!rdev->supply)
- return;
-
- rdev = supply->rdev;
- }
-}
-
-/**
* of_get_regulator - get a regulator device node based on supply name
* @dev: Device pointer for the consumer (of regulator) device
* @supply: regulator supply name
--
1.9.1
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2015-10-07 13:57 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-10-07 11:54 [PATCH] regulator: core: fix build warning Sudip Mukherjee
2015-10-07 13:56 ` Mark Brown
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®