Commit 4ccf0557 authored by Andy Shevchenko's avatar Andy Shevchenko Committed by Mark Brown

spi: ppc4xx: Use SPI_MODE_X_MASK

Use SPI_MODE_X_MASK instead of open coded variant.
Signed-off-by: default avatarAndy Shevchenko <andriy.shevchenko@linux.intel.com>
Link: https://lore.kernel.org/r/20210510131217.49357-6-andriy.shevchenko@linux.intel.comSigned-off-by: default avatarMark Brown <broonie@kernel.org>
parent fdb217a3
...@@ -235,7 +235,7 @@ static int spi_ppc4xx_setup(struct spi_device *spi) ...@@ -235,7 +235,7 @@ static int spi_ppc4xx_setup(struct spi_device *spi)
*/ */
cs->mode = SPI_PPC4XX_MODE_SPE; cs->mode = SPI_PPC4XX_MODE_SPE;
switch (spi->mode & (SPI_CPHA | SPI_CPOL)) { switch (spi->mode & SPI_MODE_X_MASK) {
case SPI_MODE_0: case SPI_MODE_0:
cs->mode |= SPI_CLK_MODE0; cs->mode |= SPI_CLK_MODE0;
break; break;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment