mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-05-05 11:01:06 -04:00
spi: Replace custom fsleep() implementation
_spi_transfer_delay_ns() partially reimplements what fsleep() does. Replace that code by calling fsleep() instead. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Link: https://patch.msgid.link/20250205130624.716039-1-andriy.shevchenko@linux.intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
This commit is contained in:
committed by
Mark Brown
parent
652ffad172
commit
215705db51
@@ -1495,10 +1495,7 @@ static void _spi_transfer_delay_ns(u32 ns)
|
||||
} else {
|
||||
u32 us = DIV_ROUND_UP(ns, NSEC_PER_USEC);
|
||||
|
||||
if (us <= 10)
|
||||
udelay(us);
|
||||
else
|
||||
usleep_range(us, us + DIV_ROUND_UP(us, 10));
|
||||
fsleep(us);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user