Skip to content

Commit 215705d

Browse files
andy-shevbroonie
authored andcommitted
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 <[email protected]> Link: https://patch.msgid.link/[email protected] Signed-off-by: Mark Brown <[email protected]>
1 parent 652ffad commit 215705d

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

drivers/spi/spi.c

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1495,10 +1495,7 @@ static void _spi_transfer_delay_ns(u32 ns)
14951495
} else {
14961496
u32 us = DIV_ROUND_UP(ns, NSEC_PER_USEC);
14971497

1498-
if (us <= 10)
1499-
udelay(us);
1500-
else
1501-
usleep_range(us, us + DIV_ROUND_UP(us, 10));
1498+
fsleep(us);
15021499
}
15031500
}
15041501

0 commit comments

Comments
 (0)