Skip to contentSkip to conversation

i2c: sprd: Add missing MODULE_DEVICE_TABLE

PATCH Applied Bixuan Cui 3 participants 3 messages Apr 10, 2021 – Apr 13, 2021

Subsystems (3)
lore
Share & tools
lore

Bixuan Cui

author
#0 lore raw

PATCH 1/1 i2c: sprd: 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/i2c/busses/i2c-sprd.c | 1 +
 1 file changed, 1 insertion(+)
drivers/i2c/busses/i2c-sprd.c +1 -0
index 2917fecf6c80..9f77d1ddbaf8 100644
@@ -640,6 +640,7 @@ static const struct of_device_id sprd_i2c_of_match[] = {
 	{ .compatible = "sprd,sc9860-i2c", },
 	{},
 };
+MODULE_DEVICE_TABLE(of, sprd_i2c_of_match);
 
 static struct platform_driver sprd_i2c_driver = {
 	.probe = sprd_i2c_probe,
maintainer Reviewed-by on v1 1/1
#1 lore raw
Quoted 7 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.

LGTM.

Quoted 17 lines
---
 drivers/i2c/busses/i2c-sprd.c | 1 +
 1 file changed, 1 insertion(+)
drivers/i2c/busses/i2c-sprd.c +1 -0
index 2917fecf6c80..9f77d1ddbaf8 100644
@@ -640,6 +640,7 @@ static const struct of_device_id sprd_i2c_of_match[] = {
        { .compatible = "sprd,sc9860-i2c", },
        {},
 };
+MODULE_DEVICE_TABLE(of, sprd_i2c_of_match);
 
 static struct platform_driver sprd_i2c_driver = {
        .probe = sprd_i2c_probe,
Signature · 1 line
Baolin Wang