Skip to content

Commit 7571438

Browse files
committed
Merge tag 'mmc-v5.4-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/ulfh/mmc
Pull MMC fixes from Ulf Hansson: "MMC host: - sdhci-iproc: Prevent some spurious interrupts - renesas_sdhi/sh_mmcif: Avoid false warnings about IRQs not found MEMSTICK host: - jmb38x_ms: Fix an error handling path at ->probe()" * tag 'mmc-v5.4-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/ulfh/mmc: memstick: jmb38x_ms: Fix an error handling path in 'jmb38x_ms_probe()' mmc: sdhci-iproc: fix spurious interrupts on Multiblock reads with bcm2711 mmc: sh_mmcif: Use platform_get_irq_optional() for optional interrupt mmc: renesas_sdhi: Do not use platform_get_irq() to count interrupts
2 parents 5f93393 + 28c9fac commit 7571438

File tree

4 files changed

+23
-17
lines changed

4 files changed

+23
-17
lines changed

drivers/memstick/host/jmb38x_ms.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -941,7 +941,7 @@ static int jmb38x_ms_probe(struct pci_dev *pdev,
941941
if (!cnt) {
942942
rc = -ENODEV;
943943
pci_dev_busy = 1;
944-
goto err_out;
944+
goto err_out_int;
945945
}
946946

947947
jm = kzalloc(sizeof(struct jmb38x_ms)

drivers/mmc/host/renesas_sdhi_core.c

Lines changed: 19 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -646,8 +646,8 @@ int renesas_sdhi_probe(struct platform_device *pdev,
646646
struct tmio_mmc_dma *dma_priv;
647647
struct tmio_mmc_host *host;
648648
struct renesas_sdhi *priv;
649+
int num_irqs, irq, ret, i;
649650
struct resource *res;
650-
int irq, ret, i;
651651
u16 ver;
652652

653653
of_data = of_device_get_match_data(&pdev->dev);
@@ -825,24 +825,31 @@ int renesas_sdhi_probe(struct platform_device *pdev,
825825
host->hs400_complete = renesas_sdhi_hs400_complete;
826826
}
827827

828-
i = 0;
829-
while (1) {
828+
num_irqs = platform_irq_count(pdev);
829+
if (num_irqs < 0) {
830+
ret = num_irqs;
831+
goto eirq;
832+
}
833+
834+
/* There must be at least one IRQ source */
835+
if (!num_irqs) {
836+
ret = -ENXIO;
837+
goto eirq;
838+
}
839+
840+
for (i = 0; i < num_irqs; i++) {
830841
irq = platform_get_irq(pdev, i);
831-
if (irq < 0)
832-
break;
833-
i++;
842+
if (irq < 0) {
843+
ret = irq;
844+
goto eirq;
845+
}
846+
834847
ret = devm_request_irq(&pdev->dev, irq, tmio_mmc_irq, 0,
835848
dev_name(&pdev->dev), host);
836849
if (ret)
837850
goto eirq;
838851
}
839852

840-
/* There must be at least one IRQ source */
841-
if (!i) {
842-
ret = irq;
843-
goto eirq;
844-
}
845-
846853
dev_info(&pdev->dev, "%s base at 0x%08lx max clock rate %u MHz\n",
847854
mmc_hostname(host->mmc), (unsigned long)
848855
(platform_get_resource(pdev, IORESOURCE_MEM, 0)->start),

drivers/mmc/host/sdhci-iproc.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -262,6 +262,7 @@ static const struct sdhci_iproc_data bcm2835_data = {
262262
};
263263

264264
static const struct sdhci_pltfm_data sdhci_bcm2711_pltfm_data = {
265+
.quirks = SDHCI_QUIRK_MULTIBLOCK_READ_ACMD12,
265266
.ops = &sdhci_iproc_32only_ops,
266267
};
267268

drivers/mmc/host/sh_mmcif.c

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1393,11 +1393,9 @@ static int sh_mmcif_probe(struct platform_device *pdev)
13931393
const char *name;
13941394

13951395
irq[0] = platform_get_irq(pdev, 0);
1396-
irq[1] = platform_get_irq(pdev, 1);
1397-
if (irq[0] < 0) {
1398-
dev_err(dev, "Get irq error\n");
1396+
irq[1] = platform_get_irq_optional(pdev, 1);
1397+
if (irq[0] < 0)
13991398
return -ENXIO;
1400-
}
14011399

14021400
res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
14031401
reg = devm_ioremap_resource(dev, res);

0 commit comments

Comments
 (0)