From: Fabio Estevam <festevam@gmail.com>
To: broonie@opensource.wolfsonmicro.com
Cc: linux-kernel@vger.kernel.org,
Fabio Estevam <fabio.estevam@freescale.com>
Subject: [PATCH] regulator: core: Remove unused get_device_regulator
Date: Wed, 27 Jun 2012 10:40:28 -0300 [thread overview]
Message-ID: <1340804428-17547-1-git-send-email-festevam@gmail.com> (raw)
From: Fabio Estevam <fabio.estevam@freescale.com>
commit 222cc7b1 (regulator: core: Allow multiple requests of a single supply mapping)
removed the usage of get_device_regulator().
Remove the function definition too amd get rid of the following warning:
drivers/regulator/core.c:112:26: warning: 'get_device_regulator' defined but not used [-Wunused-function]
Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
---
drivers/regulator/core.c | 22 ----------------------
1 files changed, 0 insertions(+), 22 deletions(-)
diff --git a/drivers/regulator/core.c b/drivers/regulator/core.c
index da31b8a..34b76cc 100644
--- a/drivers/regulator/core.c
+++ b/drivers/regulator/core.c
@@ -108,28 +108,6 @@ static const char *rdev_get_name(struct regulator_dev *rdev)
return "";
}
-/* gets the regulator for a given consumer device */
-static struct regulator *get_device_regulator(struct device *dev)
-{
- struct regulator *regulator = NULL;
- struct regulator_dev *rdev;
-
- mutex_lock(®ulator_list_mutex);
- list_for_each_entry(rdev, ®ulator_list, list) {
- mutex_lock(&rdev->mutex);
- list_for_each_entry(regulator, &rdev->consumer_list, list) {
- if (regulator->dev == dev) {
- mutex_unlock(&rdev->mutex);
- mutex_unlock(®ulator_list_mutex);
- return regulator;
- }
- }
- mutex_unlock(&rdev->mutex);
- }
- mutex_unlock(®ulator_list_mutex);
- return NULL;
-}
-
/**
* of_get_regulator - get a regulator device node based on supply name
* @dev: Device pointer for the consumer (of regulator) device
--
1.7.1
next reply other threads:[~2012-06-27 13:41 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-06-27 13:40 Fabio Estevam [this message]
2012-06-27 14:04 ` [PATCH] regulator: core: Remove unused get_device_regulator 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=1340804428-17547-1-git-send-email-festevam@gmail.com \
--to=festevam@gmail.com \
--cc=broonie@opensource.wolfsonmicro.com \
--cc=fabio.estevam@freescale.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