From 7c3eaadd0209fe21f331600ea2d904c3a0e9b287 Mon Sep 17 00:00:00 2001 From: Andy Shevchenko Date: Thu, 19 Jan 2017 12:45:42 +0200 Subject: staging: fbtft: remove custom DMA mapped buffer MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit There is no need to duplicate what SPI core already does, i.e. mapping buffers for DMA capable transfers. Remove all related pices of code. Note, that code, besides its redundancy, was buggy: DMA address potentially can be 0, SPI slave device has nothing to do with DMA capable device properties and DMA mask in particular. Suggested-by: Noralf Trønnes Acked-by: Noralf Trønnes Signed-off-by: Andy Shevchenko Signed-off-by: Greg Kroah-Hartman --- drivers/staging/fbtft/fb_ra8875.c | 4 ---- drivers/staging/fbtft/fbtft-core.c | 22 ++-------------------- drivers/staging/fbtft/fbtft-io.c | 4 ---- drivers/staging/fbtft/fbtft.h | 1 - 4 files changed, 2 insertions(+), 29 deletions(-) (limited to 'drivers') diff --git a/drivers/staging/fbtft/fb_ra8875.c b/drivers/staging/fbtft/fb_ra8875.c index 308a244972aa..a6bc1503a50e 100644 --- a/drivers/staging/fbtft/fb_ra8875.c +++ b/drivers/staging/fbtft/fb_ra8875.c @@ -42,10 +42,6 @@ static int write_spi(struct fbtft_par *par, void *buf, size_t len) } spi_message_init(&m); - if (par->txbuf.dma && buf == par->txbuf.buf) { - t.tx_dma = par->txbuf.dma; - m.is_dma_mapped = 1; - } spi_message_add_tail(&t, &m); return spi_sync(par->spi, &m); } diff --git a/drivers/staging/fbtft/fbtft-core.c b/drivers/staging/fbtft/fbtft-core.c index 300a1e4505b9..4e13090c7fbd 100644 --- a/drivers/staging/fbtft/fbtft-core.c +++ b/drivers/staging/fbtft/fbtft-core.c @@ -32,7 +32,6 @@ #include #include #include -#include #include #include #include