]> git.baikalelectronics.ru Git - kernel.git/commit
spi: spi-sun6i: sun6i_spi_drain_fifo(): remove not needed length argument
authorMarc Kleine-Budde <mkl@pengutronix.de>
Mon, 6 Jul 2020 14:34:40 +0000 (16:34 +0200)
committerMark Brown <broonie@kernel.org>
Tue, 7 Jul 2020 09:41:38 +0000 (10:41 +0100)
commit22279663e0f767fbecb67e96e7ad0c848abe4c53
tree4e8d71168cc5a1d182e54e141bb778b2826af414
parentab1c59e75277e6b584f983dc4553a8f4fcb59433
spi: spi-sun6i: sun6i_spi_drain_fifo(): remove not needed length argument

The function sun6i_spi_drain_fifo() is called with a length argument of
"sspi->fifo_depth" and "SUN6I_FIFO_DEPTH".

The driver reads the number of available bytes to read from the FIFO from the
hardware and uses the length argument to limit this value. This is not needed
as the FIFO can contain only the fifo depth number of bytes.

This patch removes the length argument and check.

Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
Acked-by: Maxime Ripard <mripard@kernel.org>
Link: https://lore.kernel.org/r/20200706143443.9855-8-mkl@pengutronix.de
Signed-off-by: Mark Brown <broonie@kernel.org>
drivers/spi/spi-sun6i.c