From: Christophe Leroy Date: Wed, 22 May 2019 11:00:36 +0000 (+0000) Subject: spi: spi-fsl-spi: call spi_finalize_current_message() at the end X-Git-Tag: v5.2-rc5~29^2~1 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=44a042182cb1e9f7916e015c836967bf638b33c4;p=thirdparty%2Fkernel%2Flinux.git spi: spi-fsl-spi: call spi_finalize_current_message() at the end spi_finalize_current_message() shall be called once all actions are finished, otherwise the last actions might step over a newly started transfer. Fixes: c592becbe704 ("spi: fsl-(e)spi: migrate to generic master queueing") Signed-off-by: Christophe Leroy Signed-off-by: Mark Brown --- diff --git a/drivers/spi/spi-fsl-spi.c b/drivers/spi/spi-fsl-spi.c index b36ac6aa3b1f2..7fbdaf0667197 100644 --- a/drivers/spi/spi-fsl-spi.c +++ b/drivers/spi/spi-fsl-spi.c @@ -432,7 +432,6 @@ static int fsl_spi_do_one_msg(struct spi_master *master, } m->status = status; - spi_finalize_current_message(master); if (status || !cs_change) { ndelay(nsecs); @@ -440,6 +439,7 @@ static int fsl_spi_do_one_msg(struct spi_master *master, } fsl_spi_setup_transfer(spi, NULL); + spi_finalize_current_message(master); return 0; }