diff mbox series

[RFC,08/11] spi: Remove unneeded READ_ONCE for ctlr->busy flag

Message ID 20220615124634.3302867-9-david@protonic.nl
State Accepted
Commit 1a9cafcb57b70fc1439d4a5cb28963122568967a
Headers show
Series Optimize spi_sync path | expand

Commit Message

David Jander June 15, 2022, 12:46 p.m. UTC
Now this flag is written entirely in the mutex, so no need for READ_ONCE

Signed-off-by: David Jander <david@protonic.nl>
---
 drivers/spi/spi.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/drivers/spi/spi.c b/drivers/spi/spi.c
index 52736e339645..29f42753ef0f 100644
--- a/drivers/spi/spi.c
+++ b/drivers/spi/spi.c
@@ -3955,7 +3955,7 @@  static void __spi_transfer_message_noqueue(struct spi_controller *ctlr, struct s
 
 	mutex_lock(&ctlr->io_mutex);
 
-	was_busy = READ_ONCE(ctlr->busy);
+	was_busy = ctlr->busy;
 
 	ret = __spi_pump_transfer_message(ctlr, msg, was_busy);
 	if (ret)