summaryrefslogtreecommitdiffstats
path: root/drivers/tty/serial/ifx6x60.c
diff options
context:
space:
mode:
authorchanning <chao.bi@intel.com>2013-01-16 06:14:20 +0100
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2013-01-16 06:35:04 +0100
commit5dd070d21e2cb34b4162d564d73cca3591f94389 (patch)
treedee8bf3c9b71780453d56c62caa43cd69f7d06fa /drivers/tty/serial/ifx6x60.c
parenttty: 8250_dw: Fix inverted arguments to serial_out in IRQ handler (diff)
downloadlinux-5dd070d21e2cb34b4162d564d73cca3591f94389.tar.xz
linux-5dd070d21e2cb34b4162d564d73cca3591f94389.zip
serial:ifx6x60:Keep word size accordance with SPI controller
As protocol driver, IFX SPI driver initiate to setup SPI master with default SPI word size as 16 bit/word, however, SPI master may not adopt this default value due to SPI controller's capability, it might choose an available value by itself and set it to spi_device.bits_per_word. In order to keep align with Controller, IFX driver should make use of this value during SPI transfer, but the default one. Signed-off-by: Chen Jun <jun.d.chen@intel.com> Signed-off-by: channing <chao.bi@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/tty/serial/ifx6x60.c')
-rw-r--r--drivers/tty/serial/ifx6x60.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/tty/serial/ifx6x60.c b/drivers/tty/serial/ifx6x60.c
index 7eed3235dad4..8cb6d8d66a13 100644
--- a/drivers/tty/serial/ifx6x60.c
+++ b/drivers/tty/serial/ifx6x60.c
@@ -811,7 +811,8 @@ static void ifx_spi_io(unsigned long data)
ifx_dev->spi_xfer.cs_change = 0;
ifx_dev->spi_xfer.speed_hz = ifx_dev->spi_dev->max_speed_hz;
/* ifx_dev->spi_xfer.speed_hz = 390625; */
- ifx_dev->spi_xfer.bits_per_word = spi_bpw;
+ ifx_dev->spi_xfer.bits_per_word =
+ ifx_dev->spi_dev->bits_per_word;
ifx_dev->spi_xfer.tx_buf = ifx_dev->tx_buffer;
ifx_dev->spi_xfer.rx_buf = ifx_dev->rx_buffer;