]> bbs.cooldavid.org Git - net-next-2.6.git/commitdiff
mmc: sdhci: Allow the probe handler to override slots
authorAlan Cox <alan@linux.intel.com>
Mon, 4 Oct 2010 14:24:21 +0000 (15:24 +0100)
committerChris Ball <cjb@laptop.org>
Sat, 23 Oct 2010 13:11:19 +0000 (21:11 +0800)
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 <alan@linux.intel.com>
Signed-off-by: Chris Ball <cjb@laptop.org>
drivers/mmc/host/sdhci-pci.c

index e8aa99deae9ac0f4c04e899c2abe2cd5a8994b36..4f5d6d00d33839e981d735baf0e3815cea0d60f4 100644 (file)
@@ -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)) {