]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/commit - drivers/spi/spi-imx.c
spi: imx: drop bogus tests for rx/tx bufs in DMA transfer
authorSascha Hauer <s.hauer@pengutronix.de>
Wed, 24 Feb 2016 08:20:33 +0000 (09:20 +0100)
committerMark Brown <broonie@kernel.org>
Fri, 26 Feb 2016 02:04:14 +0000 (11:04 +0900)
commit6b6192c04bf48ba5bec72287c2e5e9ae28217f6b
tree0fef06e108f0b32d2bd9aa00367ec0ce0c7e2fca
parentb03c3884ca8c5ad3e6d14af6c8df0e3650c67482
spi: imx: drop bogus tests for rx/tx bufs in DMA transfer

The driver tries to be clever by only setting up DMA channels when
the corresponding sg tables are non NULL. The sg tables are embedded
structs in struct spi_transfer, so they are guaranteed to be non NULL
which makes the if(tx)/if(rx) tests completely bogus. The driver even
sets the SPI_MASTER_MUST_RX / SPI_MASTER_MUST_TX flags which makes sure
the sg tables are not only present but also non empty.
Drop the tests and make the DMA path easier to follow.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Signed-off-by: Mark Brown <broonie@kernel.org>
drivers/spi/spi-imx.c