netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Wei Yongjun <weiyj.lk@gmail.com>
To: Javier Martinez Canillas <javier@osg.samsung.com>,
	Zhao Qiang <qiang.zhao@nxp.com>,
	Colin Ian King <colin.king@canonical.com>
Cc: Wei Yongjun <weiyongjun1@huawei.com>, netdev@vger.kernel.org
Subject: [PATCH net-next v2] net: wan: slic_ds26522: Use module_spi_driver to simplify the code
Date: Mon,  6 Feb 2017 15:25:52 +0000	[thread overview]
Message-ID: <20170206152552.8549-1-weiyj.lk@gmail.com> (raw)
In-Reply-To: <1476715845-27691-1-git-send-email-weiyj.lk@gmail.com>

From: Wei Yongjun <weiyongjun1@huawei.com>

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

Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com>
---
 drivers/net/wan/slic_ds26522.c | 13 +------------
 1 file changed, 1 insertion(+), 12 deletions(-)

diff --git a/drivers/net/wan/slic_ds26522.c b/drivers/net/wan/slic_ds26522.c
index 9d9b4e0..2cdcee2 100644
--- a/drivers/net/wan/slic_ds26522.c
+++ b/drivers/net/wan/slic_ds26522.c
@@ -249,15 +249,4 @@ static struct spi_driver slic_ds26522_driver = {
 	.id_table = slic_ds26522_id,
 };
 
-static int __init slic_ds26522_init(void)
-{
-	return spi_register_driver(&slic_ds26522_driver);
-}
-
-static void __exit slic_ds26522_exit(void)
-{
-	spi_unregister_driver(&slic_ds26522_driver);
-}
-
-module_init(slic_ds26522_init);
-module_exit(slic_ds26522_exit);
+module_spi_driver(slic_ds26522_driver);

  parent reply	other threads:[~2017-02-06 15:26 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-10-17 14:50 [PATCH -next] net: wan: slic_ds26522: Use module_spi_driver to simplify the code Wei Yongjun
2016-10-17 17:09 ` David Miller
2016-10-17 20:38 ` Javier Martinez Canillas
2017-02-06 15:25 ` Wei Yongjun [this message]
2017-02-07 16:42   ` [PATCH net-next v2] " 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=20170206152552.8549-1-weiyj.lk@gmail.com \
    --to=weiyj.lk@gmail.com \
    --cc=colin.king@canonical.com \
    --cc=javier@osg.samsung.com \
    --cc=netdev@vger.kernel.org \
    --cc=qiang.zhao@nxp.com \
    --cc=weiyongjun1@huawei.com \
    /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).