From: Andreas Kemnade <andreas@kemnade.info>
To: wim@linux-watchdog.org, linux@roeck-us.net,
linux-watchdog@vger.kernel.org, linux-kernel@vger.kernel.org
Cc: Andreas Kemnade <andreas@kemnade.info>
Subject: [PATCH] watchdog: rn5t618: use proper module tables
Date: Wed, 18 Sep 2024 23:29:25 +0200 [thread overview]
Message-ID: <20240918212925.1191953-1-andreas@kemnade.info> (raw)
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
next reply other threads:[~2024-09-18 21:29 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-09-18 21:29 Andreas Kemnade [this message]
2024-09-18 22:43 ` [PATCH] watchdog: rn5t618: use proper module tables Guenter Roeck
2024-09-19 10:50 ` Andreas Kemnade
2024-09-19 11:02 ` Krzysztof Kozlowski
2024-09-19 22:03 ` Andreas Kemnade
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20240918212925.1191953-1-andreas@kemnade.info \
--to=andreas@kemnade.info \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-watchdog@vger.kernel.org \
--cc=linux@roeck-us.net \
--cc=wim@linux-watchdog.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox