Skip to content

Commit 30afa63

Browse files
author
Tzung-Bi Shih
committed
platform/chrome: wilco_ec: debugfs: provide ID table for avoiding fallback match
Instead of using fallback driver name match, provide ID table[1] for the primary match. [1]: https://elixir.bootlin.com/linux/v6.8/source/drivers/base/platform.c#L1353 Reviewed-by: Krzysztof Kozlowski <[email protected]> Reviewed-by: Benson Leung <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Tzung-Bi Shih <[email protected]>
1 parent 6dd0137 commit 30afa63

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

drivers/platform/chrome/wilco_ec/debugfs.c

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
#include <linux/ctype.h>
1111
#include <linux/debugfs.h>
1212
#include <linux/fs.h>
13+
#include <linux/mod_devicetable.h>
1314
#include <linux/module.h>
1415
#include <linux/platform_data/wilco-ec.h>
1516
#include <linux/platform_device.h>
@@ -265,17 +266,23 @@ static void wilco_ec_debugfs_remove(struct platform_device *pdev)
265266
debugfs_remove_recursive(debug_info->dir);
266267
}
267268

269+
static const struct platform_device_id wilco_ec_debugfs_id[] = {
270+
{ DRV_NAME, 0 },
271+
{}
272+
};
273+
MODULE_DEVICE_TABLE(platform, wilco_ec_debugfs_id);
274+
268275
static struct platform_driver wilco_ec_debugfs_driver = {
269276
.driver = {
270277
.name = DRV_NAME,
271278
},
272279
.probe = wilco_ec_debugfs_probe,
273280
.remove_new = wilco_ec_debugfs_remove,
281+
.id_table = wilco_ec_debugfs_id,
274282
};
275283

276284
module_platform_driver(wilco_ec_debugfs_driver);
277285

278-
MODULE_ALIAS("platform:" DRV_NAME);
279286
MODULE_AUTHOR("Nick Crews <[email protected]>");
280287
MODULE_LICENSE("GPL v2");
281288
MODULE_DESCRIPTION("Wilco EC debugfs driver");

0 commit comments

Comments
 (0)