netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH -next] net: wan: slic_ds26522: Use module_spi_driver to simplify the code
@ 2016-10-17 14:50 Wei Yongjun
  2016-10-17 17:09 ` David Miller
                   ` (2 more replies)
  0 siblings, 3 replies; 5+ messages in thread
From: Wei Yongjun @ 2016-10-17 14:50 UTC (permalink / raw)
  To: Javier Martinez Canillas, Zhao Qiang; +Cc: Wei Yongjun, netdev

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 b776a0a..8f782f1 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);

^ permalink raw reply related	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2017-02-07 16:42 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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 ` [PATCH net-next v2] " Wei Yongjun
2017-02-07 16:42   ` David Miller

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).