Commit 40e46f88 authored by Ulf Hansson's avatar Ulf Hansson

mmc: Merge branch fixes into next

Merge the mmc fixes for v6.4-rc[n] into the next branch, to allow them to
get tested together with the new mmc changes that are targeted for v6.5.
Signed-off-by: default avatarUlf Hansson <ulf.hansson@linaro.org>
parents 4711c6ab 413db499
...@@ -1403,8 +1403,8 @@ static int bcm2835_probe(struct platform_device *pdev) ...@@ -1403,8 +1403,8 @@ static int bcm2835_probe(struct platform_device *pdev)
host->max_clk = clk_get_rate(clk); host->max_clk = clk_get_rate(clk);
host->irq = platform_get_irq(pdev, 0); host->irq = platform_get_irq(pdev, 0);
if (host->irq <= 0) { if (host->irq < 0) {
ret = -EINVAL; ret = host->irq;
goto err; goto err;
} }
......
...@@ -649,6 +649,7 @@ static struct platform_driver litex_mmc_driver = { ...@@ -649,6 +649,7 @@ static struct platform_driver litex_mmc_driver = {
.driver = { .driver = {
.name = "litex-mmc", .name = "litex-mmc",
.of_match_table = litex_match, .of_match_table = litex_match,
.probe_type = PROBE_PREFER_ASYNCHRONOUS,
}, },
}; };
module_platform_driver(litex_mmc_driver); module_platform_driver(litex_mmc_driver);
......
...@@ -1186,8 +1186,8 @@ static int meson_mmc_probe(struct platform_device *pdev) ...@@ -1186,8 +1186,8 @@ static int meson_mmc_probe(struct platform_device *pdev)
return PTR_ERR(host->regs); return PTR_ERR(host->regs);
host->irq = platform_get_irq(pdev, 0); host->irq = platform_get_irq(pdev, 0);
if (host->irq <= 0) if (host->irq < 0)
return -EINVAL; return host->irq;
cd_irq = platform_get_irq_optional(pdev, 1); cd_irq = platform_get_irq_optional(pdev, 1);
mmc_gpio_set_cd_irq(mmc, cd_irq); mmc_gpio_set_cd_irq(mmc, cd_irq);
......
...@@ -2724,7 +2724,7 @@ static int msdc_drv_probe(struct platform_device *pdev) ...@@ -2724,7 +2724,7 @@ static int msdc_drv_probe(struct platform_device *pdev)
host->irq = platform_get_irq(pdev, 0); host->irq = platform_get_irq(pdev, 0);
if (host->irq < 0) { if (host->irq < 0) {
ret = -EINVAL; ret = host->irq;
goto host_free; goto host_free;
} }
......
...@@ -704,7 +704,7 @@ static int mvsd_probe(struct platform_device *pdev) ...@@ -704,7 +704,7 @@ static int mvsd_probe(struct platform_device *pdev)
} }
irq = platform_get_irq(pdev, 0); irq = platform_get_irq(pdev, 0);
if (irq < 0) if (irq < 0)
return -ENXIO; return irq;
mmc = mmc_alloc_host(sizeof(struct mvsd_host), &pdev->dev); mmc = mmc_alloc_host(sizeof(struct mvsd_host), &pdev->dev);
if (!mmc) { if (!mmc) {
......
...@@ -1343,7 +1343,7 @@ static int mmc_omap_probe(struct platform_device *pdev) ...@@ -1343,7 +1343,7 @@ static int mmc_omap_probe(struct platform_device *pdev)
irq = platform_get_irq(pdev, 0); irq = platform_get_irq(pdev, 0);
if (irq < 0) if (irq < 0)
return -ENXIO; return irq;
host->virt_base = devm_platform_get_and_ioremap_resource(pdev, 0, &res); host->virt_base = devm_platform_get_and_ioremap_resource(pdev, 0, &res);
if (IS_ERR(host->virt_base)) if (IS_ERR(host->virt_base))
......
...@@ -1791,9 +1791,11 @@ static int omap_hsmmc_probe(struct platform_device *pdev) ...@@ -1791,9 +1791,11 @@ static int omap_hsmmc_probe(struct platform_device *pdev)
} }
res = platform_get_resource(pdev, IORESOURCE_MEM, 0); res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
irq = platform_get_irq(pdev, 0); if (!res)
if (res == NULL || irq < 0)
return -ENXIO; return -ENXIO;
irq = platform_get_irq(pdev, 0);
if (irq < 0)
return irq;
base = devm_ioremap_resource(&pdev->dev, res); base = devm_ioremap_resource(&pdev->dev, res);
if (IS_ERR(base)) if (IS_ERR(base))
......
...@@ -637,7 +637,7 @@ static int owl_mmc_probe(struct platform_device *pdev) ...@@ -637,7 +637,7 @@ static int owl_mmc_probe(struct platform_device *pdev)
owl_host->irq = platform_get_irq(pdev, 0); owl_host->irq = platform_get_irq(pdev, 0);
if (owl_host->irq < 0) { if (owl_host->irq < 0) {
ret = -EINVAL; ret = owl_host->irq;
goto err_release_channel; goto err_release_channel;
} }
......
...@@ -829,7 +829,7 @@ static int sdhci_acpi_probe(struct platform_device *pdev) ...@@ -829,7 +829,7 @@ static int sdhci_acpi_probe(struct platform_device *pdev)
host->ops = &sdhci_acpi_ops_dflt; host->ops = &sdhci_acpi_ops_dflt;
host->irq = platform_get_irq(pdev, 0); host->irq = platform_get_irq(pdev, 0);
if (host->irq < 0) { if (host->irq < 0) {
err = -EINVAL; err = host->irq;
goto err_free; goto err_free;
} }
......
...@@ -65,8 +65,8 @@ static int sdhci_probe(struct platform_device *pdev) ...@@ -65,8 +65,8 @@ static int sdhci_probe(struct platform_device *pdev)
host->hw_name = "sdhci"; host->hw_name = "sdhci";
host->ops = &sdhci_pltfm_ops; host->ops = &sdhci_pltfm_ops;
host->irq = platform_get_irq(pdev, 0); host->irq = platform_get_irq(pdev, 0);
if (host->irq <= 0) { if (host->irq < 0) {
ret = -EINVAL; ret = host->irq;
goto err_host; goto err_host;
} }
host->quirks = SDHCI_QUIRK_BROKEN_ADMA; host->quirks = SDHCI_QUIRK_BROKEN_ADMA;
......
...@@ -1400,7 +1400,7 @@ static int sh_mmcif_probe(struct platform_device *pdev) ...@@ -1400,7 +1400,7 @@ static int sh_mmcif_probe(struct platform_device *pdev)
irq[0] = platform_get_irq(pdev, 0); irq[0] = platform_get_irq(pdev, 0);
irq[1] = platform_get_irq_optional(pdev, 1); irq[1] = platform_get_irq_optional(pdev, 1);
if (irq[0] < 0) if (irq[0] < 0)
return -ENXIO; return irq[0];
reg = devm_platform_ioremap_resource(pdev, 0); reg = devm_platform_ioremap_resource(pdev, 0);
if (IS_ERR(reg)) if (IS_ERR(reg))
......
...@@ -1350,8 +1350,8 @@ static int sunxi_mmc_resource_request(struct sunxi_mmc_host *host, ...@@ -1350,8 +1350,8 @@ static int sunxi_mmc_resource_request(struct sunxi_mmc_host *host,
return ret; return ret;
host->irq = platform_get_irq(pdev, 0); host->irq = platform_get_irq(pdev, 0);
if (host->irq <= 0) { if (host->irq < 0) {
ret = -EINVAL; ret = host->irq;
goto error_disable_mmc; goto error_disable_mmc;
} }
......
...@@ -1757,8 +1757,10 @@ static int usdhi6_probe(struct platform_device *pdev) ...@@ -1757,8 +1757,10 @@ static int usdhi6_probe(struct platform_device *pdev)
irq_cd = platform_get_irq_byname(pdev, "card detect"); irq_cd = platform_get_irq_byname(pdev, "card detect");
irq_sd = platform_get_irq_byname(pdev, "data"); irq_sd = platform_get_irq_byname(pdev, "data");
irq_sdio = platform_get_irq_byname(pdev, "SDIO"); irq_sdio = platform_get_irq_byname(pdev, "SDIO");
if (irq_sd < 0 || irq_sdio < 0) if (irq_sd < 0)
return -ENODEV; return irq_sd;
if (irq_sdio < 0)
return irq_sdio;
mmc = mmc_alloc_host(sizeof(struct usdhi6_host), dev); mmc = mmc_alloc_host(sizeof(struct usdhi6_host), dev);
if (!mmc) if (!mmc)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment