From: Krzysztof Kozlowski Date: Tue, 5 May 2026 10:33:24 +0000 (+0200) Subject: mmc: host: Move MODULE_DEVICE_TABLE next to the table itself X-Git-Url: http://git.ipfire.org/gitweb/?a=commitdiff_plain;h=4a3e92e8cfb9741cb687b14fc6ca81714b4c2c26;p=thirdparty%2Fkernel%2Flinux.git mmc: host: Move MODULE_DEVICE_TABLE next to the table itself By convention MODULE_DEVICE_TABLE() immediately follows the ID table it exports, because this is easier to read and verify. It also makes more sense since #ifdef for ACPI or OF could hide both of them. Most of the privers already have this correctly placed, so adjust the missing ones. No functional impact. Signed-off-by: Krzysztof Kozlowski Signed-off-by: Ulf Hansson --- diff --git a/drivers/mmc/host/cavium-thunderx.c b/drivers/mmc/host/cavium-thunderx.c index 1373deb3f531e..84ff6d82ae3c0 100644 --- a/drivers/mmc/host/cavium-thunderx.c +++ b/drivers/mmc/host/cavium-thunderx.c @@ -188,6 +188,7 @@ static const struct pci_device_id thunder_mmc_id_table[] = { { PCI_DEVICE(PCI_VENDOR_ID_CAVIUM, 0xa010) }, { 0, } /* end of table */ }; +MODULE_DEVICE_TABLE(pci, thunder_mmc_id_table); static struct pci_driver thunder_mmc_driver = { .name = KBUILD_MODNAME, @@ -201,4 +202,3 @@ module_pci_driver(thunder_mmc_driver); MODULE_AUTHOR("Cavium Inc."); MODULE_DESCRIPTION("Cavium ThunderX eMMC Driver"); MODULE_LICENSE("GPL"); -MODULE_DEVICE_TABLE(pci, thunder_mmc_id_table); diff --git a/drivers/mmc/host/tifm_sd.c b/drivers/mmc/host/tifm_sd.c index c1f7d5b37911d..aebffd3ebf60e 100644 --- a/drivers/mmc/host/tifm_sd.c +++ b/drivers/mmc/host/tifm_sd.c @@ -1044,6 +1044,7 @@ static int tifm_sd_resume(struct tifm_dev *sock) static struct tifm_device_id tifm_sd_id_tbl[] = { { TIFM_TYPE_SD }, { } }; +MODULE_DEVICE_TABLE(tifm, tifm_sd_id_tbl); static struct tifm_driver tifm_sd_driver = { .driver = { @@ -1070,7 +1071,6 @@ static void __exit tifm_sd_exit(void) MODULE_AUTHOR("Alex Dubov"); MODULE_DESCRIPTION("TI FlashMedia SD driver"); MODULE_LICENSE("GPL"); -MODULE_DEVICE_TABLE(tifm, tifm_sd_id_tbl); MODULE_VERSION(DRIVER_VERSION); module_init(tifm_sd_init); diff --git a/drivers/mmc/host/wmt-sdmmc.c b/drivers/mmc/host/wmt-sdmmc.c index 1b1d691e19fcc..489daee4f4fc9 100644 --- a/drivers/mmc/host/wmt-sdmmc.c +++ b/drivers/mmc/host/wmt-sdmmc.c @@ -744,6 +744,7 @@ static const struct of_device_id wmt_mci_dt_ids[] = { { .compatible = "wm,wm8505-sdhc", .data = &wm8505_caps }, { /* Sentinel */ }, }; +MODULE_DEVICE_TABLE(of, wmt_mci_dt_ids); static int wmt_mci_probe(struct platform_device *pdev) { @@ -980,4 +981,3 @@ module_platform_driver(wmt_mci_driver); MODULE_DESCRIPTION("Wondermedia MMC/SD Driver"); MODULE_AUTHOR("Tony Prisk"); MODULE_LICENSE("GPL v2"); -MODULE_DEVICE_TABLE(of, wmt_mci_dt_ids);