Skip to contentSkip to conversation

spi: fsl-espi: remove usage of mpc8xxx_spi->flags

PATCH In review Heiner Kallweit 1 participant 1 message Nov 13, 2016 2 messages not in the archive SPI

lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): [email protected]

A message that is not in the archive (sent off-list or not yet received): a9f9bda6-b59f-997b-ea62-e742dc55eede-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org

#2 lore raw

PATCH 5/10 spi: fsl-espi: remove usage of mpc8xxx_spi->flags

Change the check to access property "mode" directly. This allows us to get rid of mpc8xxx_spi->flags in a subsequent patch in this patch series as it's used nowhere else.

---
 drivers/spi/spi-fsl-espi.c | 11 +++++------
 1 file changed, 5 insertions(+), 6 deletions(-)
drivers/spi/spi-fsl-espi.c +5 -6
index 6a011b0..e378622 100644
@@ -620,12 +620,6 @@ static int fsl_espi_probe(struct device *dev, struct resource *mem,
 	if (ret)
 		goto err_probe;
 
-	if (mpc8xxx_spi->flags & SPI_QE_CPU_MODE) {
-		dev_err(dev, "SPI_QE_CPU_MODE is not supported on ESPI!\n");
-		ret = -EINVAL;
-		goto err_probe;
-	}
-
 	/* SPI controller initializations */
 	fsl_espi_write_reg(mpc8xxx_spi, ESPI_SPMODE, 0);
 	fsl_espi_write_reg(mpc8xxx_spi, ESPI_SPIM, 0);
@@ -714,6 +708,11 @@ static int of_fsl_espi_probe(struct platform_device *ofdev)
 	unsigned int irq, num_cs;
 	int ret;
 
+	if (of_property_read_bool(np, "mode")) {
+		dev_err(dev, "mode property is not supported on ESPI!\n");
+		return -EINVAL;
+	}
+
 	ret = of_mpc8xxx_spi_probe(ofdev);
 	if (ret)
 		return ret;
Signature · 7 lines
2.10.1


--
To unsubscribe from this list: send the line "unsubscribe linux-spi" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html