public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] watchdog: rn5t618: use proper module tables
@ 2024-09-18 21:29 Andreas Kemnade
  2024-09-18 22:43 ` Guenter Roeck
  0 siblings, 1 reply; 5+ messages in thread
From: Andreas Kemnade @ 2024-09-18 21:29 UTC (permalink / raw)
  To: wim, linux, linux-watchdog, linux-kernel; +Cc: Andreas Kemnade

Avoid requiring MODULE_ALIASES by declaring proper device id tables.

Signed-off-by: Andreas Kemnade <andreas@kemnade.info>
---
 drivers/watchdog/rn5t618_wdt.c | 12 +++++++++++-
 1 file changed, 11 insertions(+), 1 deletion(-)

diff --git a/drivers/watchdog/rn5t618_wdt.c b/drivers/watchdog/rn5t618_wdt.c
index 87d06d210ac9..97ef54f01ed9 100644
--- a/drivers/watchdog/rn5t618_wdt.c
+++ b/drivers/watchdog/rn5t618_wdt.c
@@ -8,6 +8,7 @@
 #include <linux/device.h>
 #include <linux/mfd/rn5t618.h>
 #include <linux/module.h>
+#include <linux/mod_devicetable.h>
 #include <linux/platform_device.h>
 #include <linux/watchdog.h>
 
@@ -181,16 +182,25 @@ static int rn5t618_wdt_probe(struct platform_device *pdev)
 	return devm_watchdog_register_device(dev, &wdt->wdt_dev);
 }
 
+static const struct platform_device_id rn5t618_wdt_id[] = {
+	{
+		.name = "rn5t618-wdt",
+	}, {
+		/* sentinel */
+	}
+};
+MODULE_DEVICE_TABLE(platform, rn5t618_wdt_id);
+
 static struct platform_driver rn5t618_wdt_driver = {
 	.probe = rn5t618_wdt_probe,
 	.driver = {
 		.name	= DRIVER_NAME,
 	},
+	.id_table = rn5t618_wdt_id,
 };
 
 module_platform_driver(rn5t618_wdt_driver);
 
-MODULE_ALIAS("platform:rn5t618-wdt");
 MODULE_AUTHOR("Beniamino Galvani <b.galvani@gmail.com>");
 MODULE_DESCRIPTION("RN5T618 watchdog driver");
 MODULE_LICENSE("GPL v2");
-- 
2.39.2


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

end of thread, other threads:[~2024-09-19 22:03 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-09-18 21:29 [PATCH] watchdog: rn5t618: use proper module tables Andreas Kemnade
2024-09-18 22:43 ` Guenter Roeck
2024-09-19 10:50   ` Andreas Kemnade
2024-09-19 11:02     ` Krzysztof Kozlowski
2024-09-19 22:03       ` Andreas Kemnade

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