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: <20170209154519.16193-1-weiyj.lk@gmail.com>
Date:   Thu,  9 Feb 2017 15:45:19 +0000
From:   Wei Yongjun <weiyj.lk@...il.com>
To:     Evgeniy Polyakov <zbr@...emap.net>,
        Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
        "Maciej S. Szmigiero" <mail@...iej.szmigiero.name>
Cc:     Wei Yongjun <weiyongjun1@...wei.com>, linux-kernel@...r.kernel.org
Subject: [PATCH -next] w1: ds2405: use module_w1_family to simplify the code

From: Wei Yongjun <weiyongjun1@...wei.com>

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

Signed-off-by: Wei Yongjun <weiyongjun1@...wei.com>
---
 drivers/w1/slaves/w1_ds2405.c | 13 +------------
 1 file changed, 1 insertion(+), 12 deletions(-)

diff --git a/drivers/w1/slaves/w1_ds2405.c b/drivers/w1/slaves/w1_ds2405.c
index 1f350cf..d5d5487 100644
--- a/drivers/w1/slaves/w1_ds2405.c
+++ b/drivers/w1/slaves/w1_ds2405.c
@@ -224,15 +224,4 @@ static struct w1_family w1_family_ds2405 = {
 	.fops = &w1_ds2405_fops
 };
 
-static int __init w1_ds2405_init(void)
-{
-	return w1_register_family(&w1_family_ds2405);
-}
-
-static void __exit w1_ds2405_fini(void)
-{
-	w1_unregister_family(&w1_family_ds2405);
-}
-
-module_init(w1_ds2405_init);
-module_exit(w1_ds2405_fini);
+module_w1_family(w1_family_ds2405);



Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ