[PATCH] uio: uio_pdrv_genirq: Remove MODULE_DEVICE_TABLE

Vivian Wang posted 1 patch 1 month, 1 week ago
There is a newer version of this series
drivers/uio/uio_pdrv_genirq.c | 1 -
1 file changed, 1 deletion(-)
[PATCH] uio: uio_pdrv_genirq: Remove MODULE_DEVICE_TABLE
Posted by Vivian Wang 1 month, 1 week ago
The struct of_device_id list here is filled in at load time. It does not
work with MODULE_DEVICE_TABLE, which generates an alias at build time.
In this case, it generates the aliases "of:N*T*" and "of:N*T*C*", which
matches *any* OF device node, which is obviously not intended. It
confuses userspace into loading this module for any OF device, and
confuses anyone trying to resolve an OF modalias.

Fixes: 27760f868663 ("uio: uio_pdrv_genirq: Add OF support")
Signed-off-by: Vivian Wang <wangruikang@iscas.ac.cn>
---
 drivers/uio/uio_pdrv_genirq.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/drivers/uio/uio_pdrv_genirq.c b/drivers/uio/uio_pdrv_genirq.c
index 2ec7d25e826490999404382e6aa69e4af56f7fe8..633ab6b916719e783d0f82cb2f8decac35a37054 100644
--- a/drivers/uio/uio_pdrv_genirq.c
+++ b/drivers/uio/uio_pdrv_genirq.c
@@ -276,7 +276,6 @@ static struct of_device_id uio_of_genirq_match[] = {
 	{ /* This is filled with module_parm */ },
 	{ /* Sentinel */ },
 };
-MODULE_DEVICE_TABLE(of, uio_of_genirq_match);
 module_param_string(of_id, uio_of_genirq_match[0].compatible, 128, 0);
 MODULE_PARM_DESC(of_id, "Openfirmware id of the device to be handled by uio");
 #endif

---
base-commit: 062b3e4a1f880f104a8d4b90b767788786aa7b78
change-id: 20250824-uio-no-modalias-b9b4430308c8

Best regards,
-- 
Vivian "dramforever" Wang