[<prev] [next>] [day] [month] [year] [list]
Message-Id: <1474470305-31840-1-git-send-email-weiyj.lk@gmail.com>
Date: Wed, 21 Sep 2016 15:05:05 +0000
From: Wei Yongjun <weiyj.lk@...il.com>
To: John Crispin <john@...ozen.org>
Cc: Wei Yongjun <weiyongjun1@...wei.com>, netdev@...r.kernel.org
Subject: [PATCH -next] net: dsa: qca8k: use mdio_module_driver to simplify the code
From: Wei Yongjun <weiyongjun1@...wei.com>
mdio_module_driver() makes the code simpler by eliminating
boilerplate code.
Signed-off-by: Wei Yongjun <weiyongjun1@...wei.com>
---
drivers/net/dsa/qca8k.c | 14 +-------------
1 file changed, 1 insertion(+), 13 deletions(-)
diff --git a/drivers/net/dsa/qca8k.c b/drivers/net/dsa/qca8k.c
index 7f3f178..022a6bc2 100644
--- a/drivers/net/dsa/qca8k.c
+++ b/drivers/net/dsa/qca8k.c
@@ -1040,19 +1040,7 @@ static struct mdio_driver qca8kmdio_driver = {
},
};
-static int __init
-qca8kmdio_driver_register(void)
-{
- return mdio_driver_register(&qca8kmdio_driver);
-}
-module_init(qca8kmdio_driver_register);
-
-static void __exit
-qca8kmdio_driver_unregister(void)
-{
- mdio_driver_unregister(&qca8kmdio_driver);
-}
-module_exit(qca8kmdio_driver_unregister);
+mdio_module_driver(qca8kmdio_driver);
MODULE_AUTHOR("Mathieu Olivari, John Crispin <john@...ozen.org>");
MODULE_DESCRIPTION("Driver for QCA8K ethernet switch family");
Powered by blists - more mailing lists