Skip to content
Unverified Commit 0da9a579 authored by David Lechner's avatar David Lechner Committed by Mark Brown
Browse files

spi: avoid double validation in __spi_sync()



The __spi_sync() function calls __spi_validate() early in the function.
Later, it can call spi_async_locked() which calls __spi_validate()
again. __spi_validate() is an expensive function, so we can improve
performance measurably by avoiding calling it twice.

Instead of calling spi_async_locked(), we can call __spi_async() with
the spin lock held.

spi_async_locked() is removed since there are no more callers.

Signed-off-by: default avatarDavid Lechner <dlechner@baylibre.com>
Link: https://msgid.link/r/20240125234732.3530278-2-dlechner@baylibre.com


Signed-off-by: default avatarMark Brown <broonie@kernel.org>
parent a6fc5c5b
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment