]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
dmaengine: Move MODULE_DEVICE_TABLE next to the table itself
authorKrzysztof Kozlowski <krzysztof.kozlowski@oss.qualcomm.com>
Thu, 14 May 2026 06:05:26 +0000 (08:05 +0200)
committerVinod Koul <vkoul@kernel.org>
Tue, 19 May 2026 17:24:14 +0000 (22:54 +0530)
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 drivers already have this correctly placed, so adjust
the missing ones.  No functional impact.

Reviewed-by: Radhey Shyam Pandey <radhey.shyam.pandey@amd.com>
Reviewed-by: Frank Li <Frank.Li@nxp.com>
Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@oss.qualcomm.com>
Link: https://patch.msgid.link/20260514060525.9253-2-krzysztof.kozlowski@oss.qualcomm.com
Signed-off-by: Vinod Koul <vkoul@kernel.org>
drivers/dma/hisi_dma.c
drivers/dma/pch_dma.c

index 32a0e95c6a20510d5f1d94f8681460273aaf5b2c..28bf818f9aa63c3d48de8f92f05d928fa3b75bcd 100644 (file)
@@ -1037,6 +1037,7 @@ static const struct pci_device_id hisi_dma_pci_tbl[] = {
        { PCI_DEVICE(PCI_VENDOR_ID_HUAWEI, 0xa122) },
        { 0, }
 };
+MODULE_DEVICE_TABLE(pci, hisi_dma_pci_tbl);
 
 static struct pci_driver hisi_dma_pci_driver = {
        .name           = "hisi_dma",
@@ -1050,4 +1051,3 @@ MODULE_AUTHOR("Zhou Wang <wangzhou1@hisilicon.com>");
 MODULE_AUTHOR("Zhenfa Qiu <qiuzhenfa@hisilicon.com>");
 MODULE_DESCRIPTION("HiSilicon Kunpeng DMA controller driver");
 MODULE_LICENSE("GPL v2");
-MODULE_DEVICE_TABLE(pci, hisi_dma_pci_tbl);
index e9fbfd5a3d519446b13d60df4e8b7c7775cccf75..bf805f1024f649a3e2fa8dedae43f472b953f556 100644 (file)
@@ -970,6 +970,7 @@ static const struct pci_device_id pch_dma_id_table[] = {
        { PCI_VDEVICE(ROHM, PCI_DEVICE_ID_ML7831_DMA2_4CH), 4}, /* SPI */
        { 0, },
 };
+MODULE_DEVICE_TABLE(pci, pch_dma_id_table);
 
 static SIMPLE_DEV_PM_OPS(pch_dma_pm_ops, pch_dma_suspend, pch_dma_resume);
 
@@ -987,4 +988,3 @@ MODULE_DESCRIPTION("Intel EG20T PCH / LAPIS Semicon ML7213/ML7223/ML7831 IOH "
                   "DMA controller driver");
 MODULE_AUTHOR("Yong Wang <yong.y.wang@intel.com>");
 MODULE_LICENSE("GPL v2");
-MODULE_DEVICE_TABLE(pci, pch_dma_id_table);