mirror of https://gitee.com/openkylin/linux.git
spi: npcm-pspi: Use SPI_MODE_X_MASK
Use SPI_MODE_X_MASK instead of open coded variant. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Link: https://lore.kernel.org/r/20210510131217.49357-3-andriy.shevchenko@linux.intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
This commit is contained in:
parent
dd507b5ec7
commit
56f47edf33
|
@ -105,7 +105,7 @@ static void npcm_pspi_set_mode(struct spi_device *spi)
|
|||
u16 regtemp;
|
||||
u16 mode_val;
|
||||
|
||||
switch (spi->mode & (SPI_CPOL | SPI_CPHA)) {
|
||||
switch (spi->mode & SPI_MODE_X_MASK) {
|
||||
case SPI_MODE_0:
|
||||
mode_val = 0;
|
||||
break;
|
||||
|
|
Loading…
Reference in New Issue