lkml.org 
[lkml]   [2012]   [Dec]   [4]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Subject[PATCH RFT] spi: spi-xcomm: Fix wrong setting for SPI_XCOMM_SETTINGS_CPHA
From
Date
The logic of setting SPI_XCOMM_SETTINGS_CPHA bit is reversed.

Signed-off-by: Axel Lin <axel.lin@ingics.com>
---
Hi Lars,
The logic of setting SPI_XCOMM_SETTINGS_CPHA bit looks wrong to me.
Can you check if this patch works?

Thanks,
Axel

drivers/spi/spi-xcomm.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/spi/spi-xcomm.c b/drivers/spi/spi-xcomm.c
index 266a847..c2a3e8f 100644
--- a/drivers/spi/spi-xcomm.c
+++ b/drivers/spi/spi-xcomm.c
@@ -99,9 +99,9 @@ static int spi_xcomm_setup_transfer(struct spi_xcomm *spi_xcomm,
*settings &= ~SPI_XCOMM_SETTINGS_CPOL;

if (spi->mode & SPI_CPHA)
- *settings &= ~SPI_XCOMM_SETTINGS_CPHA;
- else
*settings |= SPI_XCOMM_SETTINGS_CPHA;
+ else
+ *settings &= ~SPI_XCOMM_SETTINGS_CPHA;

if (spi->mode & SPI_3WIRE)
*settings |= SPI_XCOMM_SETTINGS_3WIRE;
--
1.7.9.5




\
 
 \ /
  Last update: 2012-12-04 08:22    [W:0.040 / U:0.216 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site