]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
mmc: host: Move MODULE_DEVICE_TABLE next to the table itself
authorKrzysztof Kozlowski <krzysztof.kozlowski@oss.qualcomm.com>
Tue, 5 May 2026 10:33:24 +0000 (12:33 +0200)
committerUlf Hansson <ulf.hansson@linaro.org>
Mon, 11 May 2026 14:59:24 +0000 (16:59 +0200)
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 <krzysztof.kozlowski@oss.qualcomm.com>
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
drivers/mmc/host/cavium-thunderx.c
drivers/mmc/host/tifm_sd.c
drivers/mmc/host/wmt-sdmmc.c

index 1373deb3f531e19dbdb3138b9b9bac5d36728326..84ff6d82ae3c0aad5aa4c9ba06546c185d25616b 100644 (file)
@@ -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);
index c1f7d5b37911d8ebb8200f25826be2a654c85445..aebffd3ebf60e73a6a03e4c9399367fe3c738d50 100644 (file)
@@ -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);
index 1b1d691e19fcc7fca6298258a2df8711ce40dc9e..489daee4f4fc96759a738689273ca5ac41f873b2 100644 (file)
@@ -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);