[PATCH] net: davicom: dm9051: add missing MODULE_DEVICE_TABLE()

Pengpeng Hou posted 1 patch 3 hours ago
drivers/net/ethernet/davicom/dm9051.c | 1 +
1 file changed, 1 insertion(+)
[PATCH] net: davicom: dm9051: add missing MODULE_DEVICE_TABLE()
Posted by Pengpeng Hou 3 hours ago
The driver has a match table for the spi bus wired into its driver
structure, but the table is not exported with MODULE_DEVICE_TABLE().

Add the missing MODULE_DEVICE_TABLE() entry so module alias information
is generated for automatic module loading.

This is a source-level fix.  It does not claim dynamic hardware
reproduction; the evidence is the driver-owned match table, its use by
the driver registration structure, and the missing module alias
publication.

Signed-off-by: Pengpeng Hou <pengpeng@iscas.ac.cn>
---
 drivers/net/ethernet/davicom/dm9051.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/net/ethernet/davicom/dm9051.c b/drivers/net/ethernet/davicom/dm9051.c
index 59ea48d4c9de..194494ac5582 100644
--- a/drivers/net/ethernet/davicom/dm9051.c
+++ b/drivers/net/ethernet/davicom/dm9051.c
@@ -1241,6 +1241,7 @@ static const struct spi_device_id dm9051_id_table[] = {
 	{ "dm9051", 0 },
 	{}
 };
+MODULE_DEVICE_TABLE(spi, dm9051_id_table);
 
 static struct spi_driver dm9051_driver = {
 	.driver = {
-- 
2.53.0