aboutsummaryrefslogtreecommitdiff
path: root/drivers/base
diff options
context:
space:
mode:
authorDmitry Osipenko2020-08-30 21:53:52 +0300
committerMark Brown2020-09-01 14:54:52 +0100
commit2b32d2f7ce0a54ce74a75f0d939b5ee063a05ec5 (patch)
tree8fdbb0d7a7f9fea4c4a1d5a6b01f5978da3c8c93 /drivers/base
parent7f9fb67358a2bcaacbdfeee12e0f19e98c8bdf55 (diff)
regmap: Use flexible sleep
The multi-reg write function uses udelay(), which is a busy-loop based delaying function that is not suitable for a long delays. Hence let's replace the udelay() with fsleep(), which is flexible sleep function that selects best delay function based on the delay-time. Signed-off-by: Dmitry Osipenko <digetx@gmail.com> Link: https://lore.kernel.org/r/20200830185356.5365-3-digetx@gmail.com Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'drivers/base')
-rw-r--r--drivers/base/regmap/regmap.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/base/regmap/regmap.c b/drivers/base/regmap/regmap.c
index e93700af7e6e..a417cb1a11dc 100644
--- a/drivers/base/regmap/regmap.c
+++ b/drivers/base/regmap/regmap.c
@@ -2231,7 +2231,7 @@ static int _regmap_range_multi_paged_reg_write(struct regmap *map,
return ret;
if (regs[i].delay_us)
- udelay(regs[i].delay_us);
+ fsleep(regs[i].delay_us);
base += n;
n = 0;
@@ -2268,7 +2268,7 @@ static int _regmap_multi_reg_write(struct regmap *map,
return ret;
if (regs[i].delay_us)
- udelay(regs[i].delay_us);
+ fsleep(regs[i].delay_us);
}
return 0;
}