mfd: da9052/stmpe: Add and modify MODULE_DEVICE_TABLE
authorZou Wei <zou_wei@huawei.com>
Wed, 12 May 2021 06:33:46 +0000 (14:33 +0800)
committerLee Jones <lee.jones@linaro.org>
Wed, 2 Jun 2021 09:50:00 +0000 (10:50 +0100)
This patch adds/modifies MODULE_DEVICE_TABLE definition which generates
correct modalias for automatic loading of this driver when it is built
as an external module.

Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: Zou Wei <zou_wei@huawei.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
drivers/mfd/da9052-i2c.c
drivers/mfd/stmpe-i2c.c

index 47556d2..8ebfc7b 100644 (file)
@@ -113,6 +113,7 @@ static const struct i2c_device_id da9052_i2c_id[] = {
        {"da9053-bc", DA9053_BC},
        {}
 };
+MODULE_DEVICE_TABLE(i2c, da9052_i2c_id);
 
 #ifdef CONFIG_OF
 static const struct of_device_id dialog_dt_ids[] = {
index 61aa020..cd2f452 100644 (file)
@@ -109,7 +109,7 @@ static const struct i2c_device_id stmpe_i2c_id[] = {
        { "stmpe2403", STMPE2403 },
        { }
 };
-MODULE_DEVICE_TABLE(i2c, stmpe_id);
+MODULE_DEVICE_TABLE(i2c, stmpe_i2c_id);
 
 static struct i2c_driver stmpe_i2c_driver = {
        .driver = {