spi: consolidate setting message->spi
Previously, __spi_sync() and __spi_async() set message->spi to the spi device independently after calling __spi_validate(). __spi_validate() also would conditionally set this if it needed to split the message since it wasn't set yet. Since both __spi_sync() and __spi_async() call __spi_validate(), we can consolidate this into only setting message->spi once (unconditionally) in __spi_validate(). This will also save any future callers of __spi_validate() from also needing to set message->spi. Signed-off-by: David Lechner <dlechner@baylibre.com> Link: https://msgid.link/r/20240123214946.2616786-1-dlechner@baylibre.comSigned-off-by: Mark Brown <broonie@kernel.org>
Showing
Please register or sign in to comment