diff options
author | Johan Hovold <johan@kernel.org> | 2014-11-11 19:45:59 +0100 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2014-11-12 13:52:53 -0500 |
commit | 50fd71507e69eb96d15fa0544f23495838ae2dab (patch) | |
tree | f51f31917782679af7e9dbbd445155130323469b /drivers/net/phy/smsc.c | |
parent | 116dffa0b543a2e560abd62a0b3207b1694f9ab9 (diff) | |
download | lwn-50fd71507e69eb96d15fa0544f23495838ae2dab.tar.gz lwn-50fd71507e69eb96d15fa0544f23495838ae2dab.zip |
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/smsc.c')
-rw-r--r-- | drivers/net/phy/smsc.c | 14 |
1 files changed, 1 insertions, 13 deletions
diff --git a/drivers/net/phy/smsc.c b/drivers/net/phy/smsc.c index a4b08198fb9f..c0f6479e19d4 100644 --- a/drivers/net/phy/smsc.c +++ b/drivers/net/phy/smsc.c @@ -250,24 +250,12 @@ static struct phy_driver smsc_phy_driver[] = { .driver = { .owner = THIS_MODULE, } } }; -static int __init smsc_init(void) -{ - return phy_drivers_register(smsc_phy_driver, - ARRAY_SIZE(smsc_phy_driver)); -} - -static void __exit smsc_exit(void) -{ - phy_drivers_unregister(smsc_phy_driver, ARRAY_SIZE(smsc_phy_driver)); -} +module_phy_driver(smsc_phy_driver); MODULE_DESCRIPTION("SMSC PHY driver"); MODULE_AUTHOR("Herbert Valerio Riedel"); MODULE_LICENSE("GPL"); -module_init(smsc_init); -module_exit(smsc_exit); - static struct mdio_device_id __maybe_unused smsc_tbl[] = { { 0x0007c0a0, 0xfffffff0 }, { 0x0007c0b0, 0xfffffff0 }, |