diff options
author | Romain Perier <romain.perier@free-electrons.com> | 2016-12-21 05:10:30 -0500 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2016-12-31 13:53:16 -0500 |
commit | cfd6693c06324174ceeac7aed570a0df67db7c4f (patch) | |
tree | d74dcce50550399c0bf6c747fe491649fddf6c85 /drivers/spi/spi-armada-3700.c | |
parent | 0cc059abac0dc687dc714f3ec2c8d8a134132f56 (diff) |
spi: armada-3700: Replaced raw values for nbits by the SPI macros
Currently, function a3700_spi_pin_mode_set() configures the SPI transfer
mode according to the value passed as second argument. This value is
detected using the raw values from a switch case.
This commit replaces these raw values by the corresponding macro
constants in linux/spi/spi.h
Signed-off-by: Romain Perier <romain.perier@free-electrons.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'drivers/spi/spi-armada-3700.c')
-rw-r--r-- | drivers/spi/spi-armada-3700.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/spi/spi-armada-3700.c b/drivers/spi/spi-armada-3700.c index 4e68f34957cc..9bee56ddff39 100644 --- a/drivers/spi/spi-armada-3700.c +++ b/drivers/spi/spi-armada-3700.c | |||
@@ -170,12 +170,12 @@ static int a3700_spi_pin_mode_set(struct a3700_spi *a3700_spi, | |||
170 | val &= ~(A3700_SPI_DATA_PIN0 | A3700_SPI_DATA_PIN1); | 170 | val &= ~(A3700_SPI_DATA_PIN0 | A3700_SPI_DATA_PIN1); |
171 | 171 | ||
172 | switch (pin_mode) { | 172 | switch (pin_mode) { |
173 | case 1: | 173 | case SPI_NBITS_SINGLE: |
174 | break; | 174 | break; |
175 | case 2: | 175 | case SPI_NBITS_DUAL: |
176 | val |= A3700_SPI_DATA_PIN0; | 176 | val |= A3700_SPI_DATA_PIN0; |
177 | break; | 177 | break; |
178 | case 4: | 178 | case SPI_NBITS_QUAD: |
179 | val |= A3700_SPI_DATA_PIN1; | 179 | val |= A3700_SPI_DATA_PIN1; |
180 | break; | 180 | break; |
181 | default: | 181 | default: |