summaryrefslogtreecommitdiffstats
path: root/drivers/spi/spi-sun6i.c
diff options
context:
space:
mode:
authorIcenowy Zheng <icenowy@aosc.xyz>2017-03-20 15:38:49 +0100
committerMark Brown <broonie@kernel.org>2017-03-20 16:38:51 +0100
commit3288d5cb40c09213e86d67b5cab09de1deb65a5c (patch)
tree2b086cb27b53bcfc3096205ccccab13b70ff82e3 /drivers/spi/spi-sun6i.c
parentspi: sun6i: Allow transfers larger than FIFO size (diff)
downloadlinux-3288d5cb40c09213e86d67b5cab09de1deb65a5c.tar.xz
linux-3288d5cb40c09213e86d67b5cab09de1deb65a5c.zip
spi: sun6i: update max transfer size reported
The spi-sun6i driver have already got the ability to do large transfers. However, the max transfer size reported is still fifo depth - 1. Update the max transfer size reported to the max value possible. Reported-by: Martin Ayotte <martinayotte@gmail.com> Signed-off-by: Icenowy Zheng <icenowy@aosc.xyz> Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'drivers/spi/spi-sun6i.c')
-rw-r--r--drivers/spi/spi-sun6i.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/drivers/spi/spi-sun6i.c b/drivers/spi/spi-sun6i.c
index 6e9ca93db9bf..03a773a9531a 100644
--- a/drivers/spi/spi-sun6i.c
+++ b/drivers/spi/spi-sun6i.c
@@ -194,9 +194,7 @@ static void sun6i_spi_set_cs(struct spi_device *spi, bool enable)
static size_t sun6i_spi_max_transfer_size(struct spi_device *spi)
{
- struct sun6i_spi *sspi = spi_master_get_devdata(spi->master);
-
- return sspi->fifo_depth - 1;
+ return SUN6I_MAX_XFER_SIZE - 1;
}
static int sun6i_spi_transfer_one(struct spi_master *master,