lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20240918212925.1191953-1-andreas@kemnade.info>
Date: Wed, 18 Sep 2024 23:29:25 +0200
From: Andreas Kemnade <andreas@...nade.info>
To: wim@...ux-watchdog.org,
	linux@...ck-us.net,
	linux-watchdog@...r.kernel.org,
	linux-kernel@...r.kernel.org
Cc: Andreas Kemnade <andreas@...nade.info>
Subject: [PATCH] watchdog: rn5t618: use proper module tables

Avoid requiring MODULE_ALIASES by declaring proper device id tables.

Signed-off-by: Andreas Kemnade <andreas@...nade.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@...il.com>");
 MODULE_DESCRIPTION("RN5T618 watchdog driver");
 MODULE_LICENSE("GPL v2");
-- 
2.39.2


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ