diff mbox series

[v1,4/7] spi: oc-tiny: Use SPI_MODE_X_MASK

Message ID 20210510131217.49357-4-andriy.shevchenko@linux.intel.com (mailing list archive)
State Accepted
Commit a2f2db6b2a8708f6ac592a362e34fb330f874cea
Headers show
Series [v1,1/7] spi: Use SPI_MODE_X_MASK | expand

Commit Message

Andy Shevchenko May 10, 2021, 1:12 p.m. UTC
Use SPI_MODE_X_MASK instead of open coded variant.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
---
 drivers/spi/spi-oc-tiny.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/drivers/spi/spi-oc-tiny.c b/drivers/spi/spi-oc-tiny.c
index f3843f0ff260..38c14c4e4e21 100644
--- a/drivers/spi/spi-oc-tiny.c
+++ b/drivers/spi/spi-oc-tiny.c
@@ -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;
 }