summaryrefslogtreecommitdiffstats
path: root/drivers/spi/spi-fsl-espi.c
diff options
context:
space:
mode:
authorHeiner Kallweit <hkallweit1@gmail.com>2016-11-13 14:37:18 +0100
committerMark Brown <broonie@kernel.org>2016-11-14 12:21:26 +0100
commite3ce4f44f6a0e698f945633355d1ba5fbd32cfa6 (patch)
treec4d9657bf7ad5315374101570ef904650b337730 /drivers/spi/spi-fsl-espi.c
parentspi: fsl-espi: remove remaining usage of struct fsl_spi_platform_data (diff)
downloadlinux-e3ce4f44f6a0e698f945633355d1ba5fbd32cfa6.tar.xz
linux-e3ce4f44f6a0e698f945633355d1ba5fbd32cfa6.zip
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. Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com> Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'drivers/spi/spi-fsl-espi.c')
-rw-r--r--drivers/spi/spi-fsl-espi.c11
1 files changed, 5 insertions, 6 deletions
diff --git a/drivers/spi/spi-fsl-espi.c b/drivers/spi/spi-fsl-espi.c
index 29cd4e070d1b..38d3a9393e23 100644
--- a/drivers/spi/spi-fsl-espi.c
+++ b/drivers/spi/spi-fsl-espi.c
@@ -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);
@@ -715,6 +709,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;