summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWei Yongjun <weiyongjun1@huawei.com>2016-09-21 18:05:05 +0300
committerDavid S. Miller <davem@davemloft.net>2016-09-22 10:17:34 +0300
commita084ab33543cfa07033f91161978b626a9d9bd57 (patch)
tree9d8d48d55f61a2389ef4387bb47f3d09ce404790
parentfcfbfd68b36b2bf4e0133dffa316831a5e180199 (diff)
downloadlinux-a084ab33543cfa07033f91161978b626a9d9bd57.tar.xz
net: dsa: qca8k: use mdio_module_driver to simplify the code
mdio_module_driver() makes the code simpler by eliminating boilerplate code. Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com> Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r--drivers/net/dsa/qca8k.c14
1 files changed, 1 insertions, 13 deletions
diff --git a/drivers/net/dsa/qca8k.c b/drivers/net/dsa/qca8k.c
index 6fc379cf12e9..b3df70d07ff6 100644
--- a/drivers/net/dsa/qca8k.c
+++ b/drivers/net/dsa/qca8k.c
@@ -1032,19 +1032,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@phrozen.org>");
MODULE_DESCRIPTION("Driver for QCA8K ethernet switch family");