浏览代码

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 <alan@linux.intel.com>
Signed-off-by: Chris Ball <cjb@laptop.org>
Alan Cox 14 年之前
父节点
当前提交
225d85fe7d
共有 1 个文件被更改,包括 2 次插入0 次删除
  1. 2 0
      drivers/mmc/host/sdhci-pci.c

+ 2 - 0
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)) {