Skip to content

Commit

Permalink
spi: spi-fsl-spi: call spi_finalize_current_message() at the end
Browse files Browse the repository at this point in the history
[ Upstream commit 44a042182cb1e9f7916e015c836967bf638b33c4 ]

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 <christophe.leroy@c-s.fr>
Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
  • Loading branch information
chleroy authored and Chatur27 committed May 6, 2021
1 parent f1180f8 commit 679d38f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/spi/spi-fsl-spi.c
Expand Up @@ -408,14 +408,14 @@ 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);
fsl_spi_chipselect(spi, BITBANG_CS_INACTIVE);
}

fsl_spi_setup_transfer(spi, NULL);
spi_finalize_current_message(master);
return 0;
}

Expand Down

0 comments on commit 679d38f

Please sign in to comment.