diff options
author | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2014-12-01 04:21:03 +0100 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2014-12-01 04:21:03 +0100 |
commit | c00552ebafddfe6abb397d957004f165e010abd2 (patch) | |
tree | b397d6773b545755ffdae7566f8b96b08ee54ebb /drivers/spi/spi-dw.c | |
parent | Merge tag 'for-3.19' of git://git.kernel.org/pub/scm/linux/kernel/git/kishon/... (diff) | |
parent | Linux 3.18-rc7 (diff) | |
download | linux-c00552ebafddfe6abb397d957004f165e010abd2.tar.xz linux-c00552ebafddfe6abb397d957004f165e010abd2.zip |
Merge 3.18-rc7 into usb-next
We need the xhci fixes here and this resolves a merge issue with
drivers/usb/dwc3/ep0.c
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/spi/spi-dw.c')
-rw-r--r-- | drivers/spi/spi-dw.c | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/drivers/spi/spi-dw.c b/drivers/spi/spi-dw.c index 72e12bad14b9..d0d5542efc06 100644 --- a/drivers/spi/spi-dw.c +++ b/drivers/spi/spi-dw.c @@ -376,9 +376,6 @@ static void pump_transfers(unsigned long data) chip = dws->cur_chip; spi = message->spi; - if (unlikely(!chip->clk_div)) - chip->clk_div = dws->max_freq / chip->speed_hz; - if (message->state == ERROR_STATE) { message->status = -EIO; goto early_exit; @@ -419,7 +416,7 @@ static void pump_transfers(unsigned long data) if (transfer->speed_hz) { speed = chip->speed_hz; - if (transfer->speed_hz != speed) { + if ((transfer->speed_hz != speed) || (!chip->clk_div)) { speed = transfer->speed_hz; /* clk_div doesn't support odd number */ @@ -581,7 +578,6 @@ static int dw_spi_setup(struct spi_device *spi) dev_err(&spi->dev, "No max speed HZ parameter\n"); return -EINVAL; } - chip->speed_hz = spi->max_speed_hz; chip->tmode = 0; /* Tx & Rx */ /* Default SPI mode is SCPOL = 0, SCPH = 0 */ |