From: "Michał Mirosław" <mirq-linux@rere.qmqm.pl>
To: Liam Girdwood <lgirdwood@gmail.com>,
Mark Brown <broonie@kernel.org>,
Dmitry Osipenko <digetx@gmail.com>,
Support Opensource <support.opensource@diasemi.com>
Cc: linux-kernel@vger.kernel.org, patches@opensource.cirrus.com
Subject: [PATCH 3/3] regulator: unexport regulator_lock/unlock()
Date: Mon, 10 Aug 2020 06:33:33 +0200 [thread overview]
Message-ID: <090775a675cf8ea644c4b65903f18b314acbc504.1597032945.git.mirq-linux@rere.qmqm.pl> (raw)
In-Reply-To: <cover.1597032945.git.mirq-linux@rere.qmqm.pl>
regulator_lock/unlock() was used only to guard
regulator_notifier_call_chain(). As no users remain, make the functions
internal.
Signed-off-by: Michał Mirosław <mirq-linux@rere.qmqm.pl>
---
drivers/regulator/core.c | 6 ++----
include/linux/regulator/driver.h | 3 ---
2 files changed, 2 insertions(+), 7 deletions(-)
diff --git a/drivers/regulator/core.c b/drivers/regulator/core.c
index f4035167e7ba..0a32c3da0e26 100644
--- a/drivers/regulator/core.c
+++ b/drivers/regulator/core.c
@@ -170,11 +170,10 @@ static inline int regulator_lock_nested(struct regulator_dev *rdev,
* than the one, which initially locked the mutex, it will
* wait on mutex.
*/
-void regulator_lock(struct regulator_dev *rdev)
+static void regulator_lock(struct regulator_dev *rdev)
{
regulator_lock_nested(rdev, NULL);
}
-EXPORT_SYMBOL_GPL(regulator_lock);
/**
* regulator_unlock - unlock a single regulator
@@ -183,7 +182,7 @@ EXPORT_SYMBOL_GPL(regulator_lock);
* This function unlocks the mutex when the
* reference counter reaches 0.
*/
-void regulator_unlock(struct regulator_dev *rdev)
+static void regulator_unlock(struct regulator_dev *rdev)
{
if (WARN_ON_ONCE(rdev->ref_cnt <= 0))
return;
@@ -191,7 +190,6 @@ void regulator_unlock(struct regulator_dev *rdev)
if (--rdev->ref_cnt == 0)
ww_mutex_unlock(&rdev->mutex);
}
-EXPORT_SYMBOL_GPL(regulator_unlock);
static bool regulator_supply_is_couple(struct regulator_dev *rdev)
{
diff --git a/include/linux/regulator/driver.h b/include/linux/regulator/driver.h
index 2fe5b1bcbe2f..9c5a74cdebfe 100644
--- a/include/linux/regulator/driver.h
+++ b/include/linux/regulator/driver.h
@@ -532,9 +532,6 @@ int regulator_set_current_limit_regmap(struct regulator_dev *rdev,
int regulator_get_current_limit_regmap(struct regulator_dev *rdev);
void *regulator_get_init_drvdata(struct regulator_init_data *reg_init_data);
-void regulator_lock(struct regulator_dev *rdev);
-void regulator_unlock(struct regulator_dev *rdev);
-
/*
* Helper functions intended to be used by regulator drivers prior registering
* their regulators.
--
2.20.1
next prev parent reply other threads:[~2020-08-10 4:33 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-08-10 4:33 [PATCH 0/3] regulator: unexport regulator_lock/unlock() Michał Mirosław
2020-08-10 4:33 ` [PATCH 2/3] regulator: remove locking around regulator_notifier_call_chain() Michał Mirosław
2020-08-10 14:17 ` Adam Thomson
2020-09-06 11:58 ` Dmitry Osipenko
2020-08-10 4:33 ` [PATCH 1/3] regulator: don't require mutex for regulator_notifier_call_chain() Michał Mirosław
2020-09-06 11:55 ` Dmitry Osipenko
2020-08-10 4:33 ` Michał Mirosław [this message]
2020-09-06 11:59 ` [PATCH 3/3] regulator: unexport regulator_lock/unlock() Dmitry Osipenko
2020-09-06 0:07 ` [PATCH 0/3] " Michał Mirosław
[not found] ` <159950194954.52863.7080307258573052895.b4-ty@kernel.org>
2020-09-15 18:55 ` Michał Mirosław
2020-09-16 10:36 ` Mark Brown
2020-09-19 21:28 ` [PATCH v2] " Michał Mirosław
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=090775a675cf8ea644c4b65903f18b314acbc504.1597032945.git.mirq-linux@rere.qmqm.pl \
--to=mirq-linux@rere.qmqm.pl \
--cc=broonie@kernel.org \
--cc=digetx@gmail.com \
--cc=lgirdwood@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=patches@opensource.cirrus.com \
--cc=support.opensource@diasemi.com \
/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;
as well as URLs for NNTP newsgroup(s).