spi: Set ctlr->cur_msg also in the sync transfer case
authorDavid Jander <david@protonic.nl>
Tue, 21 Jun 2022 06:12:32 +0000 (08:12 +0200)
committerMark Brown <broonie@kernel.org>
Mon, 27 Jun 2022 12:27:24 +0000 (13:27 +0100)
Some drivers rely on this to point to the currently processed message, so
set this here also.

Signed-off-by: David Jander <david@protonic.nl>
Link: https://lore.kernel.org/r/20220621061234.3626638-10-david@protonic.nl
Signed-off-by: Mark Brown <broonie@kernel.org>
drivers/spi/spi.c

index 29f4275..3df84f4 100644 (file)
@@ -3957,6 +3957,7 @@ static void __spi_transfer_message_noqueue(struct spi_controller *ctlr, struct s
 
        was_busy = ctlr->busy;
 
+       ctlr->cur_msg = msg;
        ret = __spi_pump_transfer_message(ctlr, msg, was_busy);
        if (ret)
                goto out;