From: Wei Yongjun <weiyj_lk@163.com>
To: Zhao Qiang <qiang.zhao@nxp.com>
Cc: Wei Yongjun <yongjun_wei@trendmicro.com.cn>,
netdev@vger.kernel.org, linuxppc-dev@lists.ozlabs.org
Subject: [PATCH -next] wan/fsl_ucc_hdlc: use module_platform_driver to simplify the code
Date: Tue, 19 Jul 2016 11:25:16 +0000 [thread overview]
Message-ID: <1468927516-32569-1-git-send-email-weiyj_lk@163.com> (raw)
From: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
module_platform_driver() makes the code simpler by eliminating
boilerplate code.
Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
---
drivers/net/wan/fsl_ucc_hdlc.c | 13 +------------
1 file changed, 1 insertion(+), 12 deletions(-)
diff --git a/drivers/net/wan/fsl_ucc_hdlc.c b/drivers/net/wan/fsl_ucc_hdlc.c
index b3861bf..3f6b218 100644
--- a/drivers/net/wan/fsl_ucc_hdlc.c
+++ b/drivers/net/wan/fsl_ucc_hdlc.c
@@ -1175,15 +1175,4 @@ static struct platform_driver ucc_hdlc_driver = {
},
};
-static int __init ucc_hdlc_init(void)
-{
- return platform_driver_register(&ucc_hdlc_driver);
-}
-
-static void __exit ucc_hdlc_exit(void)
-{
- platform_driver_unregister(&ucc_hdlc_driver);
-}
-
-module_init(ucc_hdlc_init);
-module_exit(ucc_hdlc_exit);
+module_platform_driver(ucc_hdlc_driver);
next reply other threads:[~2016-07-19 11:40 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-07-19 11:25 Wei Yongjun [this message]
2016-07-20 21:47 ` [PATCH -next] wan/fsl_ucc_hdlc: use module_platform_driver to simplify the code David Miller
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=1468927516-32569-1-git-send-email-weiyj_lk@163.com \
--to=weiyj_lk@163.com \
--cc=linuxppc-dev@lists.ozlabs.org \
--cc=netdev@vger.kernel.org \
--cc=qiang.zhao@nxp.com \
--cc=yongjun_wei@trendmicro.com.cn \
/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;
as well as URLs for NNTP newsgroup(s).