提交 61c951de 编写于 作者: A Adrian Hunter 提交者: Ulf Hansson

mmc: sdhci-pci: Let devices define how to add the host

SDHCI provides more flexibility than simply calling sdhci_add_host(). Make
that available by allowing devices to specify their own ->add_host()
function.
Signed-off-by: NAdrian Hunter <adrian.hunter@intel.com>
Signed-off-by: NUlf Hansson <ulf.hansson@linaro.org>
Tested-by: NLudovic Desroches <ludovic.desroches@microchip.com>
上级 f12e39db
...@@ -1949,7 +1949,10 @@ static struct sdhci_pci_slot *sdhci_pci_probe_slot( ...@@ -1949,7 +1949,10 @@ static struct sdhci_pci_slot *sdhci_pci_probe_slot(
} }
} }
ret = sdhci_add_host(host); if (chip->fixes && chip->fixes->add_host)
ret = chip->fixes->add_host(slot);
else
ret = sdhci_add_host(host);
if (ret) if (ret)
goto remove; goto remove;
......
...@@ -64,6 +64,7 @@ struct sdhci_pci_fixes { ...@@ -64,6 +64,7 @@ struct sdhci_pci_fixes {
int (*probe) (struct sdhci_pci_chip *); int (*probe) (struct sdhci_pci_chip *);
int (*probe_slot) (struct sdhci_pci_slot *); int (*probe_slot) (struct sdhci_pci_slot *);
int (*add_host) (struct sdhci_pci_slot *);
void (*remove_slot) (struct sdhci_pci_slot *, int); void (*remove_slot) (struct sdhci_pci_slot *, int);
int (*suspend) (struct sdhci_pci_chip *); int (*suspend) (struct sdhci_pci_chip *);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册