Commit a2f2db6b authored by Andy Shevchenko's avatar Andy Shevchenko Committed by Mark Brown

spi: oc-tiny: 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-4-andriy.shevchenko@linux.intel.comSigned-off-by: default avatarMark Brown <broonie@kernel.org>
parent 56f47edf
...@@ -86,7 +86,7 @@ static int tiny_spi_setup(struct spi_device *spi) ...@@ -86,7 +86,7 @@ static int tiny_spi_setup(struct spi_device *spi)
hw->speed_hz = spi->max_speed_hz; hw->speed_hz = spi->max_speed_hz;
hw->baud = tiny_spi_baud(spi, hw->speed_hz); hw->baud = tiny_spi_baud(spi, hw->speed_hz);
} }
hw->mode = spi->mode & (SPI_CPOL | SPI_CPHA); hw->mode = spi->mode & SPI_MODE_X_MASK;
return 0; return 0;
} }
......
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