From: Alan Cox Date: Mon, 4 Oct 2010 14:24:21 +0000 (+0100) Subject: mmc: sdhci: Allow the probe handler to override slots X-Git-Tag: firefly_0821_release~7613^2~3588^2~20 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=225d85fe7ddca2985548d98e410f7baf4a5d6260;p=firefly-linux-kernel-4.4.55.git mmc: sdhci: Allow the probe handler to override slots Currently we write it to the chip data, but if the probe handler overrides it we ignore the new value and keep using our cached one. Fix this so that a probe handler can adjust the slot count. Signed-off-by: Alan Cox Signed-off-by: Chris Ball --- diff --git a/drivers/mmc/host/sdhci-pci.c b/drivers/mmc/host/sdhci-pci.c index e8aa99deae9a..4f5d6d00d338 100644 --- a/drivers/mmc/host/sdhci-pci.c +++ b/drivers/mmc/host/sdhci-pci.c @@ -818,6 +818,8 @@ static int __devinit sdhci_pci_probe(struct pci_dev *pdev, goto free; } + slots = chip->num_slots; /* Quirk may have changed this */ + for (i = 0;i < slots;i++) { slot = sdhci_pci_probe_slot(pdev, chip, first_bar + i); if (IS_ERR(slot)) {