diff options
| author | David Lechner <[email protected]> | 2024-07-09 01:05:28 +0000 |
|---|---|---|
| committer | Mark Brown <[email protected]> | 2024-07-09 16:42:31 +0000 |
| commit | c86a918b1bdba78fb155184f8d88dfba1e63335d (patch) | |
| tree | 6ae05673f983884441fac4c8bc2d2ad36bdfae70 /drivers/spi/spi.c | |
| parent | spi: omap2-mcspi: Revert multi mode support (diff) | |
| download | kernel-c86a918b1bdba78fb155184f8d88dfba1e63335d.tar.gz kernel-c86a918b1bdba78fb155184f8d88dfba1e63335d.zip | |
spi: don't unoptimize message in spi_async()
Calling spi_maybe_unoptimize_message() in spi_async() is wrong because
the message is likely to be in the queue and not transferred yet. This
can corrupt the message while it is being used by the controller driver.
spi_maybe_unoptimize_message() is already called in the correct place
in spi_finalize_current_message() to balance the call to
spi_maybe_optimize_message() in spi_async().
Fixes: 7b1d87af14d9 ("spi: add spi_optimize_message() APIs")
Signed-off-by: David Lechner <[email protected]>
Link: https://patch.msgid.link/[email protected]
Signed-off-by: Mark Brown <[email protected]>
Diffstat (limited to 'drivers/spi/spi.c')
| -rw-r--r-- | drivers/spi/spi.c | 2 |
1 files changed, 0 insertions, 2 deletions
diff --git a/drivers/spi/spi.c b/drivers/spi/spi.c index fc13fa192189..679ee414cbea 100644 --- a/drivers/spi/spi.c +++ b/drivers/spi/spi.c @@ -4432,8 +4432,6 @@ int spi_async(struct spi_device *spi, struct spi_message *message) spin_unlock_irqrestore(&ctlr->bus_lock_spinlock, flags); - spi_maybe_unoptimize_message(message); - return ret; } EXPORT_SYMBOL_GPL(spi_async); |
