spi: core: Ignore unsupported spi-[tr]x-bus-width property values
authorGeert Uytterhoeven <geert+renesas@glider.be>
Mon, 26 May 2014 12:05:25 +0000 (14:05 +0200)
committerMark Brown <broonie@linaro.org>
Mon, 26 May 2014 14:28:47 +0000 (15:28 +0100)
Rejecting unsupported values of spi-tx-bus-width and spi-rx-bus-width
may break compatibility with future DTs. Just ignore them, falling back
to Single SPI Transfers.

Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Signed-off-by: Mark Brown <broonie@linaro.org>
drivers/spi/spi.c

index f01cbb41e6cad8037df776a5d44efc1d2e2d41ef..147e0707f43ff03f623cce0b8dc745a4506490f3 100644 (file)
@@ -1247,11 +1247,10 @@ static void of_register_spi_devices(struct spi_master *master)
                                spi->mode |= SPI_TX_QUAD;
                                break;
                        default:
-                               dev_err(&master->dev,
-                                       "spi-tx-bus-width %d not supported\n",
-                                       value);
-                               spi_dev_put(spi);
-                               continue;
+                               dev_warn(&master->dev,
+                                        "spi-tx-bus-width %d not supported\n",
+                                        value);
+                               break;
                        }
                }
 
@@ -1266,11 +1265,10 @@ static void of_register_spi_devices(struct spi_master *master)
                                spi->mode |= SPI_RX_QUAD;
                                break;
                        default:
-                               dev_err(&master->dev,
-                                       "spi-rx-bus-width %d not supported\n",
-                                       value);
-                               spi_dev_put(spi);
-                               continue;
+                               dev_warn(&master->dev,
+                                        "spi-rx-bus-width %d not supported\n",
+                                        value);
+                               break;
                        }
                }