path: root/drivers/mmc
diff options
authorAndy Shevchenko <>2021-04-19 14:24:56 +0300
committerUlf Hansson <>2021-04-23 09:29:49 +0200
commit6c857ccf4eedfdf8b8cabdd36e3675469f59d31b (patch)
tree2572813f69e78b0b7e0650dfbbe33815e642c895 /drivers/mmc
parent6dab809bb5b183015e19d558bfa95107de660be0 (diff)
mmc: mmc_spi: Set up polling even if voltage-ranges is not present
When voltage-ranges property is not present the driver assumes that it is 3.3v (3.2v..3.4v). But at the same time it disallows polling. Fix that by dropping the comparison to 0 when no property is provided. While at it, mark voltage-ranges property optional as it was initially. Fixes: 9c43df57910b ("mmc_spi: Add support for OpenFirmware bindings") Signed-off-by: Andy Shevchenko <> Link: Signed-off-by: Ulf Hansson <>
Diffstat (limited to 'drivers/mmc')
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/mmc/host/of_mmc_spi.c b/drivers/mmc/host/of_mmc_spi.c
index acd96ea399b8..843ec3db891b 100644
--- a/drivers/mmc/host/of_mmc_spi.c
+++ b/drivers/mmc/host/of_mmc_spi.c
@@ -66,7 +66,7 @@ struct mmc_spi_platform_data *mmc_spi_get_pdata(struct spi_device *spi)
if (!oms)
return NULL;
- if (mmc_of_parse_voltage(mmc, &oms->pdata.ocr_mask) <= 0)
+ if (mmc_of_parse_voltage(mmc, &oms->pdata.ocr_mask) < 0)
goto err_ocr;
oms->detect_irq = irq_of_parse_and_map(np, 0);