summaryrefslogtreecommitdiffstats
path: root/drivers/spi/spi-dw.c
diff options
context:
space:
mode:
authorJarkko Nikula2015-09-15 15:26:24 +0200
committerMark Brown2015-09-17 19:35:25 +0200
commit55f9a0706f60df4639010c91d6f28ce6b2351179 (patch)
treefa5e6e6d178254a522b78c87b0c9cc9872a679ac /drivers/spi/spi-dw.c
parentspi: dw: Remove needless if statements (diff)
downloadkernel-qcow2-linux-55f9a0706f60df4639010c91d6f28ce6b2351179.tar.gz
kernel-qcow2-linux-55f9a0706f60df4639010c91d6f28ce6b2351179.tar.xz
kernel-qcow2-linux-55f9a0706f60df4639010c91d6f28ce6b2351179.zip
spi: dw: Remove test for non-zero spi->max_speed_hz
Test for non-zero spi->max_speed_hz in dw_spi_setup() looks needless as spi_setup() defaults to master->max_speed_hz in case it is not set. This drivers sets the master->max_speed_hz based on max_freq data passed to it via dw_spi_add_host() call. I suppose things have already fallen apart if dw_spi_mmio_probe() or spi_pci_probe() ever passes zero max_freq. Signed-off-by: Jarkko Nikula <jarkko.nikula@linux.intel.com> Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'drivers/spi/spi-dw.c')
-rw-r--r--drivers/spi/spi-dw.c5
1 files changed, 0 insertions, 5 deletions
diff --git a/drivers/spi/spi-dw.c b/drivers/spi/spi-dw.c
index 2b5d736465c9..1153d36ec8a6 100644
--- a/drivers/spi/spi-dw.c
+++ b/drivers/spi/spi-dw.c
@@ -448,11 +448,6 @@ static int dw_spi_setup(struct spi_device *spi)
}
chip->bits_per_word = spi->bits_per_word;
- if (!spi->max_speed_hz) {
- dev_err(&spi->dev, "No max speed HZ parameter\n");
- return -EINVAL;
- }
-
chip->tmode = 0; /* Tx & Rx */
/* Default SPI mode is SCPOL = 0, SCPH = 0 */
chip->cr0 = (chip->bits_per_word - 1)