Skip to contentSkip to conversation

iommu/virtio: Add missing MODULE_DEVICE_TABLE

PATCH In review Bixuan Cui 3 participants 3 messages May 8, 2021 – May 18, 2021

Subsystems (4)
lore
Share & tools
lore

Bixuan Cui

author
#0 lore raw

PATCH 1/1 iommu/virtio: Add missing MODULE_DEVICE_TABLE

This patch adds missing MODULE_DEVICE_TABLE definition which generates correct modalias for automatic loading of this driver when it is built as an external module.

---
 drivers/iommu/virtio-iommu.c | 1 +
 1 file changed, 1 insertion(+)
drivers/iommu/virtio-iommu.c +1 -0
index 7c02481a81b4..c6e5ee4d9cef 100644
@@ -1136,6 +1136,7 @@ static struct virtio_device_id id_table[] = {
 	{ VIRTIO_ID_IOMMU, VIRTIO_DEV_ANY_ID },
 	{ 0 },
 };
+MODULE_DEVICE_TABLE(virtio, id_table);
 
 static struct virtio_driver virtio_iommu_drv = {
 	.driver.name		= KBUILD_MODNAME,
Reviewed-by on v1 1/1
#1 lore raw
Quoted 6 lines · Bixuan Cui

This patch adds missing MODULE_DEVICE_TABLE definition which generates correct modalias for automatic loading of this driver when it is built as an external module.

Fixes fa4afd78ea12 ("iommu/virtio: Build virtio-iommu as module")
Quoted 10 lines
---
 drivers/iommu/virtio-iommu.c | 1 +
 1 file changed, 1 insertion(+)
drivers/iommu/virtio-iommu.c +0 -0
index 7c02481a81b4..c6e5ee4d9cef 100644

drivers/iommu/virtio-iommu.c static struct virtio_device_id id_table[] = { · line 1142

Quoted 7 lines
drivers/iommu/virtio-iommu.c +1 -0
@@ -1136,6 +1136,7 @@ static struct virtio_device_id id_table[] = {
 	{ VIRTIO_ID_IOMMU, VIRTIO_DEV_ANY_ID },
 	{ 0 },
 };
+MODULE_DEVICE_TABLE(virtio, id_table);
 
 static struct virtio_driver virtio_iommu_drv = {
 	.driver.name		= KBUILD_MODNAME,

_______________________________________________
iommu mailing list
[email protected]
https://lists.linuxfoundation.org/mailman/listinfo/iommu