spi: oc-tiny: 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-4-andriy.shevchenko@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
This commit is contained in:
Andy Shevchenko 2021-05-10 16:12:14 +03:00 committed by Mark Brown
parent 56f47edf33
commit a2f2db6b2a
No known key found for this signature in database
GPG Key ID: 24D68B725D5487D0

View File

@ -86,7 +86,7 @@ static int tiny_spi_setup(struct spi_device *spi)
hw->speed_hz = spi->max_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;
}