Skip to content

Commit a38dce4

Browse files
computersforpeacebroonie
authored andcommitted
regulator: core: Rename _regulator_enable_delay()
I want to use it in other contexts besides _regulator_do_enable(). Signed-off-by: Brian Norris <[email protected]> Link: https://lore.kernel.org/r/20220420141511.v2.1.I31ef0014c9597d53722ab513890f839f357fdfb3@changeid Signed-off-by: Mark Brown <[email protected]>
1 parent bab7651 commit a38dce4

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

drivers/regulator/core.c

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2529,17 +2529,17 @@ static int regulator_ena_gpio_ctrl(struct regulator_dev *rdev, bool enable)
25292529
}
25302530

25312531
/**
2532-
* _regulator_enable_delay - a delay helper function
2532+
* _regulator_delay_helper - a delay helper function
25332533
* @delay: time to delay in microseconds
25342534
*
25352535
* Delay for the requested amount of time as per the guidelines in:
25362536
*
25372537
* Documentation/timers/timers-howto.rst
25382538
*
2539-
* The assumption here is that regulators will never be enabled in
2539+
* The assumption here is that these regulator operations will never used in
25402540
* atomic context and therefore sleeping functions can be used.
25412541
*/
2542-
static void _regulator_enable_delay(unsigned int delay)
2542+
static void _regulator_delay_helper(unsigned int delay)
25432543
{
25442544
unsigned int ms = delay / 1000;
25452545
unsigned int us = delay % 1000;
@@ -2621,7 +2621,7 @@ static int _regulator_do_enable(struct regulator_dev *rdev)
26212621
s64 remaining = ktime_us_delta(end, ktime_get());
26222622

26232623
if (remaining > 0)
2624-
_regulator_enable_delay(remaining);
2624+
_regulator_delay_helper(remaining);
26252625
}
26262626

26272627
if (rdev->ena_pin) {
@@ -2648,14 +2648,14 @@ static int _regulator_do_enable(struct regulator_dev *rdev)
26482648
/* If poll_enabled_time is set, poll upto the delay calculated
26492649
* above, delaying poll_enabled_time uS to check if the regulator
26502650
* actually got enabled.
2651-
* If the regulator isn't enabled after enable_delay has
2652-
* expired, return -ETIMEDOUT.
2651+
* If the regulator isn't enabled after our delay helper has expired,
2652+
* return -ETIMEDOUT.
26532653
*/
26542654
if (rdev->desc->poll_enabled_time) {
26552655
unsigned int time_remaining = delay;
26562656

26572657
while (time_remaining > 0) {
2658-
_regulator_enable_delay(rdev->desc->poll_enabled_time);
2658+
_regulator_delay_helper(rdev->desc->poll_enabled_time);
26592659

26602660
if (rdev->desc->ops->get_status) {
26612661
ret = _regulator_check_status_enabled(rdev);
@@ -2674,7 +2674,7 @@ static int _regulator_do_enable(struct regulator_dev *rdev)
26742674
return -ETIMEDOUT;
26752675
}
26762676
} else {
2677-
_regulator_enable_delay(delay);
2677+
_regulator_delay_helper(delay);
26782678
}
26792679

26802680
trace_regulator_enable_complete(rdev_get_name(rdev));

0 commit comments

Comments
 (0)