Fix fallout from r292180 (Dec 2015)... ensure that every driver which has
a DRIVER_MODULE() referencing mmc_driver has a MODULE_DEPEND() on mmc. This is because the kernel linker only searches for symbols in dependent modules, so loading sdhci_pci (and other bus-flavors of sdhci) would fail when mmc was not compiled into the kernel (even if you hand-loaded mmc first). (Thanks to jilles@ for providing the vital clue about the kernel linker.)
This commit is contained in:
parent
151439df17
commit
4e5b50116d
@ -943,3 +943,4 @@ static driver_t a10_mmc_driver = {
|
||||
|
||||
DRIVER_MODULE(a10_mmc, simplebus, a10_mmc_driver, a10_mmc_devclass, 0, 0);
|
||||
DRIVER_MODULE(mmc, a10_mmc, mmc_driver, mmc_devclass, NULL, NULL);
|
||||
MODULE_DEPEND(a10_mmc, mmc, 1, 1, 1);
|
||||
|
@ -1099,3 +1099,4 @@ DRIVER_MODULE(aml8726_mmc, simplebus, aml8726_mmc_driver,
|
||||
aml8726_mmc_devclass, 0, 0);
|
||||
MODULE_DEPEND(aml8726_mmc, aml8726_gpio, 1, 1, 1);
|
||||
DRIVER_MODULE(mmc, aml8726_mmc, mmc_driver, mmc_devclass, NULL, NULL);
|
||||
MODULE_DEPEND(aml8726_mmc, mmc, 1, 1, 1);
|
||||
|
@ -1378,3 +1378,4 @@ DRIVER_MODULE(aml8726_sdxc, simplebus, aml8726_sdxc_driver,
|
||||
aml8726_sdxc_devclass, 0, 0);
|
||||
MODULE_DEPEND(aml8726_sdxc, aml8726_gpio, 1, 1, 1);
|
||||
DRIVER_MODULE(mmc, aml8726_sdxc, mmc_driver, mmc_devclass, NULL, NULL);
|
||||
MODULE_DEPEND(aml8726_sdxc, mmc, 1, 1, 1);
|
||||
|
@ -1412,3 +1412,4 @@ DRIVER_MODULE(at91_mci, atmelarm, at91_mci_driver, at91_mci_devclass, NULL,
|
||||
NULL);
|
||||
#endif
|
||||
DRIVER_MODULE(mmc, at91_mci, mmc_driver, mmc_devclass, NULL, NULL);
|
||||
MODULE_DEPEND(at91_mci, mmc, 1, 1, 1);
|
||||
|
@ -672,3 +672,4 @@ static driver_t bcm_sdhci_driver = {
|
||||
DRIVER_MODULE(sdhci_bcm, simplebus, bcm_sdhci_driver, bcm_sdhci_devclass, 0, 0);
|
||||
MODULE_DEPEND(sdhci_bcm, sdhci, 1, 1, 1);
|
||||
DRIVER_MODULE(mmc, sdhci_bcm, mmc_driver, mmc_devclass, NULL, NULL);
|
||||
MODULE_DEPEND(sdhci_bcm, mmc, 1, 1, 1);
|
||||
|
@ -836,3 +836,4 @@ static driver_t imx_sdhci_driver = {
|
||||
DRIVER_MODULE(sdhci_imx, simplebus, imx_sdhci_driver, imx_sdhci_devclass, 0, 0);
|
||||
MODULE_DEPEND(sdhci_imx, sdhci, 1, 1, 1);
|
||||
DRIVER_MODULE(mmc, sdhci_imx, mmc_driver, mmc_devclass, NULL, NULL);
|
||||
MODULE_DEPEND(sdhci_imx, mmc, 1, 1, 1);
|
||||
|
@ -776,3 +776,4 @@ static driver_t lpc_mmc_driver = {
|
||||
|
||||
DRIVER_MODULE(lpcmmc, simplebus, lpc_mmc_driver, lpc_mmc_devclass, 0, 0);
|
||||
DRIVER_MODULE(mmc, lpcmmc, mmc_driver, mmc_devclass, NULL, NULL);
|
||||
MODULE_DEPEND(lpcmmc, mmc, 1, 1, 1);
|
||||
|
@ -722,3 +722,4 @@ static driver_t ti_sdhci_driver = {
|
||||
DRIVER_MODULE(sdhci_ti, simplebus, ti_sdhci_driver, ti_sdhci_devclass, 0, 0);
|
||||
MODULE_DEPEND(sdhci_ti, sdhci, 1, 1, 1);
|
||||
DRIVER_MODULE(mmc, sdhci_ti, mmc_driver, mmc_devclass, NULL, NULL);
|
||||
MODULE_DEPEND(sdhci_ti, mmc, 1, 1, 1);
|
||||
|
@ -1178,3 +1178,4 @@ static devclass_t dwmmc_devclass;
|
||||
DRIVER_MODULE(dwmmc, simplebus, dwmmc_driver, dwmmc_devclass, 0, 0);
|
||||
DRIVER_MODULE(dwmmc, ofwbus, dwmmc_driver, dwmmc_devclass, 0, 0);
|
||||
DRIVER_MODULE(mmc, dwmmc, mmc_driver, mmc_devclass, NULL, NULL);
|
||||
MODULE_DEPEND(dwmmc, mmc, 1, 1, 1);
|
||||
|
@ -1811,3 +1811,5 @@ driver_t mmc_driver = {
|
||||
sizeof(struct mmc_softc),
|
||||
};
|
||||
devclass_t mmc_devclass;
|
||||
|
||||
MODULE_VERSION(mmc, 1);
|
||||
|
@ -308,3 +308,4 @@ DRIVER_MODULE(sdhci_fdt, simplebus, sdhci_fdt_driver, sdhci_fdt_devclass,
|
||||
NULL, NULL);
|
||||
MODULE_DEPEND(sdhci_fdt, sdhci, 1, 1, 1);
|
||||
DRIVER_MODULE(mmc, sdhci_fdt, mmc_driver, mmc_devclass, NULL, NULL);
|
||||
MODULE_DEPEND(sdhci_fdt, mmc, 1, 1, 1);
|
||||
|
@ -475,3 +475,4 @@ DRIVER_MODULE(sdhci_pci, pci, sdhci_pci_driver, sdhci_pci_devclass, NULL,
|
||||
NULL);
|
||||
MODULE_DEPEND(sdhci_pci, sdhci, 1, 1, 1);
|
||||
DRIVER_MODULE(mmc, sdhci_pci, mmc_driver, mmc_devclass, NULL, NULL);
|
||||
MODULE_DEPEND(sdhci_pci, mmc, 1, 1, 1);
|
||||
|
@ -126,7 +126,7 @@ static devclass_t fsl_sdhc_devclass;
|
||||
|
||||
DRIVER_MODULE(sdhci_fsl, simplebus, fsl_sdhc_driver, fsl_sdhc_devclass, 0, 0);
|
||||
DRIVER_MODULE(mmc, sdhci_fsl, mmc_driver, mmc_devclass, NULL, NULL);
|
||||
|
||||
MODULE_DEPEND(sdhci_fsl, mmc, 1, 1, 1);
|
||||
|
||||
/*****************************************************************************
|
||||
* Private methods
|
||||
|
Loading…
Reference in New Issue
Block a user