Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

authored by

Romain Perier and committed by
Mark Brown
cfd6693c 0cc059ab

+3 -3
+3 -3
drivers/spi/spi-armada-3700.c
··· 170 170 val &= ~(A3700_SPI_DATA_PIN0 | A3700_SPI_DATA_PIN1); 171 171 172 172 switch (pin_mode) { 173 - case 1: 173 + case SPI_NBITS_SINGLE: 174 174 break; 175 - case 2: 175 + case SPI_NBITS_DUAL: 176 176 val |= A3700_SPI_DATA_PIN0; 177 177 break; 178 - case 4: 178 + case SPI_NBITS_QUAD: 179 179 val |= A3700_SPI_DATA_PIN1; 180 180 break; 181 181 default: