summaryrefslogtreecommitdiff
path: root/drivers/net/phy/micrel.c
diff options
context:
space:
mode:
authorJohan Hovold <johan@kernel.org>2014-11-11 18:45:59 (GMT)
committerDavid S. Miller <davem@davemloft.net>2014-11-12 18:52:53 (GMT)
commit50fd71507e69eb96d15fa0544f23495838ae2dab (patch)
treef51f31917782679af7e9dbbd445155130323469b /drivers/net/phy/micrel.c
parent116dffa0b543a2e560abd62a0b3207b1694f9ab9 (diff)
downloadlinux-50fd71507e69eb96d15fa0544f23495838ae2dab.tar.xz
net: phy: replace phy_drivers_register calls
Replace module init/exit which only calls phy_drivers_register with module_phy_driver macro. Tested using Micrel driver, and otherwise compile-tested only. Signed-off-by: Johan Hovold <johan@kernel.org> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/phy/micrel.c')
-rw-r--r--drivers/net/phy/micrel.c15
1 files changed, 1 insertions, 14 deletions
diff --git a/drivers/net/phy/micrel.c b/drivers/net/phy/micrel.c
index 8c2a29a..bcc6c0e 100644
--- a/drivers/net/phy/micrel.c
+++ b/drivers/net/phy/micrel.c
@@ -657,20 +657,7 @@ static struct phy_driver ksphy_driver[] = {
.driver = { .owner = THIS_MODULE, },
} };
-static int __init ksphy_init(void)
-{
- return phy_drivers_register(ksphy_driver,
- ARRAY_SIZE(ksphy_driver));
-}
-
-static void __exit ksphy_exit(void)
-{
- phy_drivers_unregister(ksphy_driver,
- ARRAY_SIZE(ksphy_driver));
-}
-
-module_init(ksphy_init);
-module_exit(ksphy_exit);
+module_phy_driver(ksphy_driver);
MODULE_DESCRIPTION("Micrel PHY driver");
MODULE_AUTHOR("David J. Choi");