Signed-off-by: Feng Tang <[email protected]>
---
 drivers/spi/dw_spi.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/spi/dw_spi.c b/drivers/spi/dw_spi.c
index 4f29488..4e82194 100644
--- a/drivers/spi/dw_spi.c
+++ b/drivers/spi/dw_spi.c
@@ -198,7 +198,7 @@ static void dw_writer(struct dw_spi *dws)
        while (max--) {
                /* Set the tx word if the transfer's original "tx" is not null 
*/
                if (dws->tx_end - dws->len) {
-                       if (dws->n_bytes == 8)
+                       if (dws->n_bytes == 1)
                                txw = *(u8 *)(dws->tx);
                        else
                                txw = *(u16 *)(dws->tx);
@@ -217,7 +217,7 @@ static void dw_reader(struct dw_spi *dws)
                rxw = dw_readw(dws, dr);
                /* Care rx only if the transfer's original "rx" is not null */
                if (dws->rx_end - dws->len) {
-                       if (dws->n_bytes == 8)
+                       if (dws->n_bytes == 1)
                                *(u8 *)(dws->rx) = rxw;
                        else
                                *(u16 *)(dws->rx) = rxw;
-- 
1.7.0.4

_______________________________________________
MeeGo-kernel mailing list
[email protected]
http://lists.meego.com/listinfo/meego-kernel

Reply via email to