Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 61c951de authored by Adrian Hunter's avatar Adrian Hunter Committed by Ulf Hansson
Browse files

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: default avatarAdrian Hunter <adrian.hunter@intel.com>
Signed-off-by: default avatarUlf Hansson <ulf.hansson@linaro.org>
Tested-by: default avatarLudovic Desroches <ludovic.desroches@microchip.com>
parent f12e39db
Loading
Loading
Loading
Loading
+4 −1
Original line number Diff line number Diff line
@@ -1949,6 +1949,9 @@ static struct sdhci_pci_slot *sdhci_pci_probe_slot(
		}
	}

	if (chip->fixes && chip->fixes->add_host)
		ret = chip->fixes->add_host(slot);
	else
		ret = sdhci_add_host(host);
	if (ret)
		goto remove;
+1 −0
Original line number Diff line number Diff line
@@ -64,6 +64,7 @@ struct sdhci_pci_fixes {
	int			(*probe) (struct sdhci_pci_chip *);

	int			(*probe_slot) (struct sdhci_pci_slot *);
	int			(*add_host) (struct sdhci_pci_slot *);
	void			(*remove_slot) (struct sdhci_pci_slot *, int);

	int			(*suspend) (struct sdhci_pci_chip *);