From: Sudip Mukherjee <sudipm.mukherjee@gmail.com>
To: Liam Girdwood <lgirdwood@gmail.com>, Mark Brown <broonie@kernel.org>
Cc: linux-kernel@vger.kernel.org,
Sudip Mukherjee <sudipm.mukherjee@gmail.com>
Subject: [PATCH] regulator: core: fix build warning
Date: Wed, 7 Oct 2015 17:24:14 +0530 [thread overview]
Message-ID: <1444218854-17944-1-git-send-email-sudipm.mukherjee@gmail.com> (raw)
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
next reply other threads:[~2015-10-07 11:54 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-10-07 11:54 Sudip Mukherjee [this message]
2015-10-07 13:56 ` Mark Brown
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1444218854-17944-1-git-send-email-sudipm.mukherjee@gmail.com \
--to=sudipm.mukherjee@gmail.com \
--cc=broonie@kernel.org \
--cc=lgirdwood@gmail.com \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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®