Skip to content

Commit 4c9db39

Browse files
osctobebroonie
authored andcommitted
regulator: unexport regulator_lock/unlock()
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> Link: https://lore.kernel.org/r/d3381aabd2632aff5e7b839d55868bec6e85c811.1600550732.git.mirq-linux@rere.qmqm.pl Signed-off-by: Mark Brown <broonie@kernel.org>
1 parent 0199f86 commit 4c9db39

2 files changed

Lines changed: 2 additions & 7 deletions

File tree

‎drivers/regulator/core.c‎

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -190,11 +190,10 @@ static inline int regulator_lock_nested(struct regulator_dev *rdev,
190190
* than the one, which initially locked the mutex, it will
191191
* wait on mutex.
192192
*/
193-
void regulator_lock(struct regulator_dev *rdev)
193+
static void regulator_lock(struct regulator_dev *rdev)
194194
{
195195
regulator_lock_nested(rdev, NULL);
196196
}
197-
EXPORT_SYMBOL_GPL(regulator_lock);
198197

199198
/**
200199
* regulator_unlock - unlock a single regulator
@@ -203,7 +202,7 @@ EXPORT_SYMBOL_GPL(regulator_lock);
203202
* This function unlocks the mutex when the
204203
* reference counter reaches 0.
205204
*/
206-
void regulator_unlock(struct regulator_dev *rdev)
205+
static void regulator_unlock(struct regulator_dev *rdev)
207206
{
208207
mutex_lock(&regulator_nesting_mutex);
209208

@@ -216,7 +215,6 @@ void regulator_unlock(struct regulator_dev *rdev)
216215

217216
mutex_unlock(&regulator_nesting_mutex);
218217
}
219-
EXPORT_SYMBOL_GPL(regulator_unlock);
220218

221219
static bool regulator_supply_is_couple(struct regulator_dev *rdev)
222220
{

‎include/linux/regulator/driver.h‎

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -533,9 +533,6 @@ int regulator_set_current_limit_regmap(struct regulator_dev *rdev,
533533
int regulator_get_current_limit_regmap(struct regulator_dev *rdev);
534534
void *regulator_get_init_drvdata(struct regulator_init_data *reg_init_data);
535535

536-
void regulator_lock(struct regulator_dev *rdev);
537-
void regulator_unlock(struct regulator_dev *rdev);
538-
539536
/*
540537
* Helper functions intended to be used by regulator drivers prior registering
541538
* their regulators.

0 commit comments

Comments
 (0)