From: Wei Yongjun <weiyj.lk@gmail.com>
To: Evgeniy Polyakov <zbr@ioremap.net>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
"Maciej S. Szmigiero" <mail@maciej.szmigiero.name>
Cc: Wei Yongjun <weiyongjun1@huawei.com>, linux-kernel@vger.kernel.org
Subject: [PATCH -next] w1: ds2405: use module_w1_family to simplify the code
Date: Thu, 9 Feb 2017 15:45:19 +0000 [thread overview]
Message-ID: <20170209154519.16193-1-weiyj.lk@gmail.com> (raw)
From: Wei Yongjun <weiyongjun1@huawei.com>
module_w1_family() makes the code simpler by eliminating
boilerplate code.
Signed-off-by: Wei Yongjun <weiyongjun1@huawei.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);
next reply other threads:[~2017-02-09 15:46 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-02-09 15:45 Wei Yongjun [this message]
2017-02-10 1:23 ` Maciej S. Szmigiero
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=20170209154519.16193-1-weiyj.lk@gmail.com \
--to=weiyj.lk@gmail.com \
--cc=gregkh@linuxfoundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mail@maciej.szmigiero.name \
--cc=weiyongjun1@huawei.com \
--cc=zbr@ioremap.net \
/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
all inboxes | Powered by JetHome®