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>] [day] [month] [year] [list]
Message-ID: <20200918031115.3982776-1-liushixin2@huawei.com>
Date:   Fri, 18 Sep 2020 11:11:15 +0800
From:   Liu Shixin <liushixin2@...wei.com>
To:     Evgeniy Polyakov <zbr@...emap.net>
CC:     <linux-kernel@...r.kernel.org>, Liu Shixin <liushixin2@...wei.com>
Subject: [PATCH -next] w1: ds28e17: use module_w1_family to simplify the code

module_w1_family() makes the code simpler by eliminating
boilerplate code.

Signed-off-by: Liu Shixin <liushixin2@...wei.com>
---
 drivers/w1/slaves/w1_ds28e17.c | 17 +----------------
 1 file changed, 1 insertion(+), 16 deletions(-)

diff --git a/drivers/w1/slaves/w1_ds28e17.c b/drivers/w1/slaves/w1_ds28e17.c
index 046ddda83df9..d165aa9d803f 100644
--- a/drivers/w1/slaves/w1_ds28e17.c
+++ b/drivers/w1/slaves/w1_ds28e17.c
@@ -751,19 +751,4 @@ static struct w1_family w1_family_19 = {
 	.fid = W1_FAMILY_DS28E17,
 	.fops = &w1_f19_fops,
 };
-
-
-/* Module init and remove functions. */
-static int __init w1_f19_init(void)
-{
-	return w1_register_family(&w1_family_19);
-}
-
-static void __exit w1_f19_fini(void)
-{
-	w1_unregister_family(&w1_family_19);
-}
-
-module_init(w1_f19_init);
-module_exit(w1_f19_fini);
-
+module_w1_family(w1_family_19);
-- 
2.25.1

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ