]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
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)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 20 Jul 2021 14:22:41 +0000 (16:22 +0200)
[ Upstream commit 4700ef326556ed74aba188f12396740a8c1c21dd ]

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>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/mfd/da9052-i2c.c
drivers/mfd/stmpe-i2c.c

index 2697ffb08009b48c3803dbfc9263b309f13ff444..2992fd94bc0c47dd68db585f889699398818b8c2 100644 (file)
@@ -118,6 +118,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 c3f4aab53b0796b169719e61a90a8a0817057e93..663a6c1c3d0dfeb7b497c8b7aa7c43acd683446a 100644 (file)
@@ -107,7 +107,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 = {