net: dsa: b53: Utilize mdio_module_driver
authorFlorian Fainelli <f.fainelli@gmail.com>
Mon, 23 Jan 2017 05:17:33 +0000 (21:17 -0800)
committerDavid S. Miller <davem@davemloft.net>
Tue, 24 Jan 2017 18:37:51 +0000 (13:37 -0500)
Eliminate a bit of boilerplate code.

Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
Reviewed-by: Andrew Lunn <andrew@lunn.ch>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/dsa/b53/b53_mdio.c

index 477a16b5660ab61f7bda3dce2438d95b5806513c..fa7556f5d4fb1b98a1da56c18bccad65f020171f 100644 (file)
@@ -375,18 +375,7 @@ static struct mdio_driver b53_mdio_driver = {
                .of_match_table = b53_of_match,
        },
 };
-
-static int __init b53_mdio_driver_register(void)
-{
-       return mdio_driver_register(&b53_mdio_driver);
-}
-module_init(b53_mdio_driver_register);
-
-static void __exit b53_mdio_driver_unregister(void)
-{
-       mdio_driver_unregister(&b53_mdio_driver);
-}
-module_exit(b53_mdio_driver_unregister);
+mdio_module_driver(b53_mdio_driver);
 
 MODULE_DESCRIPTION("B53 MDIO access driver");
 MODULE_LICENSE("Dual BSD/GPL");