Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1447515
| From | Vivien Didelot <vivien.didelot@savoirfairelinux.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | [PATCH net-next] net: dsa: b53: use module_mdio_driver |
| Date | 2016-07-21 00:30 +0200 |
| Message-ID | <rX8a6-7mz-27@gated-at.bofh.it> (permalink) |
| Organization | linux.* mail to news gateway |
Reduce boilerplate for module declaration with module_mdio_driver.
Signed-off-by: Vivien Didelot <vivien.didelot@savoirfairelinux.com>
---
drivers/net/dsa/b53/b53_mdio.c | 12 +-----------
1 file changed, 1 insertion(+), 11 deletions(-)
diff --git a/drivers/net/dsa/b53/b53_mdio.c b/drivers/net/dsa/b53/b53_mdio.c
index aa87c3f..87265c8 100644
--- a/drivers/net/dsa/b53/b53_mdio.c
+++ b/drivers/net/dsa/b53/b53_mdio.c
@@ -376,17 +376,7 @@ static struct mdio_driver b53_mdio_driver = {
},
};
-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");
--
2.9.0
Back to linux.kernel | Previous | Next — Next in thread | Find similar | Unroll thread
[PATCH net-next] net: dsa: b53: use module_mdio_driver Vivien Didelot <vivien.didelot@savoirfairelinux.com> - 2016-07-21 00:30 +0200 Re: [PATCH net-next] net: dsa: b53: use module_mdio_driver Florian Fainelli <f.fainelli@gmail.com> - 2016-07-21 00:50 +0200
csiph-web