public inbox for linux-i2c@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] i2c: fix module autoloading
@ 2024-08-15  9:02 Yuntao Liu
  2025-05-22  9:18 ` Wolfram Sang
  0 siblings, 1 reply; 2+ messages in thread
From: Yuntao Liu @ 2024-08-15  9:02 UTC (permalink / raw)
  To: linux-kernel, linux-i2c; +Cc: david-b, khali, wsa+renesas, liuyuntao12

Add MODULE_DEVICE_TABLE(), so modules could be properly autoloaded
based on the alias from i2c_device_id table.

Fixes: e9f1373b64388 ("i2c: Add i2c_new_dummy() utility")
Signed-off-by: Yuntao Liu <liuyuntao12@huawei.com>
---
 drivers/i2c/i2c-core-base.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/i2c/i2c-core-base.c b/drivers/i2c/i2c-core-base.c
index b63f75e44296..82622ef71b41 100644
--- a/drivers/i2c/i2c-core-base.c
+++ b/drivers/i2c/i2c-core-base.c
@@ -1070,6 +1070,7 @@ static const struct i2c_device_id dummy_id[] = {
 	{ "smbus_host_notify", },
 	{ },
 };
+MODULE_DEVICE_TABLE(i2c, dummy_id);
 
 static int dummy_probe(struct i2c_client *client)
 {
-- 
2.34.1


^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2025-05-22  9:18 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-08-15  9:02 [PATCH] i2c: fix module autoloading Yuntao Liu
2025-05-22  9:18 ` Wolfram Sang

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox