diff options
author | Arnd Bergmann <arnd@arndb.de> | 2012-04-30 16:31:27 +0000 |
---|---|---|
committer | Arnd Bergmann <arnd@arndb.de> | 2012-10-17 15:25:23 +0200 |
commit | c10356b9846b13651a8a24c3a31e029ffe6eafd9 (patch) | |
tree | 81a81068cb30069c64f372194d1c9df5643e8c74 /drivers | |
parent | fdc858a466b738d35d3492bc7cf77b1dac98bf7c (diff) | |
download | linux-3.10-c10356b9846b13651a8a24c3a31e029ffe6eafd9.tar.gz linux-3.10-c10356b9846b13651a8a24c3a31e029ffe6eafd9.tar.bz2 linux-3.10-c10356b9846b13651a8a24c3a31e029ffe6eafd9.zip |
spi/s3c64xx: use correct dma_transfer_direction type
There is a subtle difference between dma_transfer_direction and
dma_data_direction: the former is used by the dmaengine framework,
while the latter is used by the dma-mapping API. Although the
purpose is comparable, the actual values are different and must
not be mixed. In this case, the driver just wants to use
dma_transfer_direction.
Without this patch, building s3c6400_defconfig results in:
drivers/spi/spi-s3c64xx.c: In function 's3c64xx_spi_dmacb':
drivers/spi/spi-s3c64xx.c:239:21: warning: comparison between
'enum dma_data_direction' and 'enum dma_transfer_direction' [-Wenum-compare]
As pointed out by Kukjin Kim, this also changes the use of constants
from DMA_FROM_DEVICE/DMA_TO_DEVICE to DMA_DEV_TO_MEM/DMA_MEM_TO_DEV.
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Acked-by: Kukjin Kim <kgene.kim@samsung.com>
Cc: Ben Dooks <ben-linux@fluff.org>
Cc: Grant Likely <grant.likely@secretlab.ca>
Cc: linux-arm-kernel@lists.infradead.org
Cc: linux-samsung-soc@vger.kernel.org
Cc: spi-devel-general@lists.sourceforge.net
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/spi/spi-s3c64xx.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/spi/spi-s3c64xx.c b/drivers/spi/spi-s3c64xx.c index d1c8441f638..cd43b4b985a 100644 --- a/drivers/spi/spi-s3c64xx.c +++ b/drivers/spi/spi-s3c64xx.c @@ -132,7 +132,7 @@ struct s3c64xx_spi_dma_data { unsigned ch; - enum dma_data_direction direction; + enum dma_transfer_direction direction; enum dma_ch dmach; struct property *dma_prop; }; @@ -1065,11 +1065,11 @@ static int __devinit s3c64xx_spi_get_dmares( if (tx) { dma_data = &sdd->tx_dma; - dma_data->direction = DMA_TO_DEVICE; + dma_data->direction = DMA_MEM_TO_DEV; chan_str = "tx"; } else { dma_data = &sdd->rx_dma; - dma_data->direction = DMA_FROM_DEVICE; + dma_data->direction = DMA_DEV_TO_MEM; chan_str = "rx"; } |