diff options
author | Andy Shevchenko <andriy.shevchenko@linux.intel.com> | 2014-10-02 15:31:07 +0200 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2014-10-02 18:06:26 +0200 |
commit | 15ee3be78b017ee9d697fe59d45cdfbb35d9fdeb (patch) | |
tree | e93d0c3c779c72b96496842aedcd3482871cfed4 /drivers/spi/spi-dw-mid.c | |
parent | spi: dw: fix style of code in few places (diff) | |
download | linux-15ee3be78b017ee9d697fe59d45cdfbb35d9fdeb.tar.xz linux-15ee3be78b017ee9d697fe59d45cdfbb35d9fdeb.zip |
spi: dw-mid: change magic numbers to the constants
Instead of using magic numbers in the code we create a bit map definition of
the DMACR register and use it.
There is no functional change.
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'drivers/spi/spi-dw-mid.c')
-rw-r--r-- | drivers/spi/spi-dw-mid.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/spi/spi-dw-mid.c b/drivers/spi/spi-dw-mid.c index ecae30fe28af..7bdf93747e5f 100644 --- a/drivers/spi/spi-dw-mid.c +++ b/drivers/spi/spi-dw-mid.c @@ -124,9 +124,9 @@ static int mid_spi_dma_transfer(struct dw_spi *dws, int cs_change) dw_writew(dws, DW_SPI_DMARDLR, 0xf); dw_writew(dws, DW_SPI_DMATDLR, 0x10); if (dws->tx_dma) - dma_ctrl |= 0x2; + dma_ctrl |= SPI_DMA_TDMAE; if (dws->rx_dma) - dma_ctrl |= 0x1; + dma_ctrl |= SPI_DMA_RDMAE; dw_writew(dws, DW_SPI_DMACR, dma_ctrl); spi_enable_chip(dws, 1); } |