diff mbox

spi: Use SPI_BPW_MASK macro at appropriate places

Message ID 1391608758.5368.1.camel@phoenix (mailing list archive)
State Accepted
Commit aa188f90ff1a82fa8f848092ff4969dba78b275f
Headers show

Commit Message

Axel Lin Feb. 5, 2014, 1:59 p.m. UTC
Signed-off-by: Axel Lin <axel.lin@ingics.com>
---
 drivers/spi/spi-bfin-v3.c | 3 ++-
 drivers/spi/spi-ti-qspi.c | 3 ++-
 2 files changed, 4 insertions(+), 2 deletions(-)

Comments

Mark Brown Feb. 7, 2014, 12:21 p.m. UTC | #1
On Wed, Feb 05, 2014 at 09:59:18PM +0800, Axel Lin wrote:
> Signed-off-by: Axel Lin <axel.lin@ingics.com>

Applied, thanks.
diff mbox

Patch

diff --git a/drivers/spi/spi-bfin-v3.c b/drivers/spi/spi-bfin-v3.c
index 8f85988..4089d0e 100644
--- a/drivers/spi/spi-bfin-v3.c
+++ b/drivers/spi/spi-bfin-v3.c
@@ -822,7 +822,8 @@  static int bfin_spi_probe(struct platform_device *pdev)
 	master->cleanup = bfin_spi_cleanup;
 	master->setup = bfin_spi_setup;
 	master->transfer_one_message = bfin_spi_transfer_one_message;
-	master->bits_per_word_mask = BIT(32 - 1) | BIT(16 - 1) | BIT(8 - 1);
+	master->bits_per_word_mask = SPI_BPW_MASK(32) | SPI_BPW_MASK(16) |
+				     SPI_BPW_MASK(8);
 
 	drv_data = spi_master_get_devdata(master);
 	drv_data->master = master;
diff --git a/drivers/spi/spi-ti-qspi.c b/drivers/spi/spi-ti-qspi.c
index 3d09265..7eb2cef 100644
--- a/drivers/spi/spi-ti-qspi.c
+++ b/drivers/spi/spi-ti-qspi.c
@@ -435,7 +435,8 @@  static int ti_qspi_probe(struct platform_device *pdev)
 	master->auto_runtime_pm = true;
 	master->transfer_one_message = ti_qspi_start_transfer_one;
 	master->dev.of_node = pdev->dev.of_node;
-	master->bits_per_word_mask = BIT(32 - 1) | BIT(16 - 1) | BIT(8 - 1);
+	master->bits_per_word_mask = SPI_BPW_MASK(32) | SPI_BPW_MASK(16) |
+				     SPI_BPW_MASK(8);
 
 	if (!of_property_read_u32(np, "num-cs", &num_cs))
 		master->num_chipselect = num_cs;