diff options
author | Tudor Ambarus <tudor.ambarus@microchip.com> | 2020-03-13 17:25:07 +0200 |
---|---|---|
committer | Tudor Ambarus <tudor.ambarus@microchip.com> | 2020-03-13 17:34:13 +0200 |
commit | 69228a0224c533c35b62b88a79aa96768ba29d5e (patch) | |
tree | edb2563a0b167b48c3f146a69c918b2466ec29ed /drivers/spi/spi.c | |
parent | 2dcbfe365b130321b1b48cfa55f7bdad6baf85ad (diff) | |
parent | e11e8473bcec748c3820636f11b986f611c9309b (diff) |
Merge tag 'mtk-mtd-spi-move' into spi-nor/next
spi: Rewrite mtk-quadspi spi-nor driver with spi-mem
This patchset from Chuanhong Guo <gch981213@gmail.com> adds a spi-mem
driver for Mediatek SPI-NOR controller, which already has limited
support by mtk-quadspi. This new driver can make use of full quadspi
capability of this controller.
The mtk-quadspi driver is replaced by the new spi-mtk-nor driver.
Merge it in spi-nor/next to avoid conflicts during the release cycle.
Diffstat (limited to 'drivers/spi/spi.c')
-rw-r--r-- | drivers/spi/spi.c | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/drivers/spi/spi.c b/drivers/spi/spi.c index 38b4c78df506..c0c55dc79972 100644 --- a/drivers/spi/spi.c +++ b/drivers/spi/spi.c @@ -1955,13 +1955,8 @@ static int of_spi_parse_dt(struct spi_controller *ctlr, struct spi_device *spi, spi->mode |= SPI_CS_HIGH; /* Device speed */ - rc = of_property_read_u32(nc, "spi-max-frequency", &value); - if (rc) { - dev_err(&ctlr->dev, - "%pOF has no valid 'spi-max-frequency' property (%d)\n", nc, rc); - return rc; - } - spi->max_speed_hz = value; + if (!of_property_read_u32(nc, "spi-max-frequency", &value)) + spi->max_speed_hz = value; return 0; } |