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>
This commit is contained in:
committed by
David S. Miller
parent
116dffa0b5
commit
50fd71507e
@@ -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");
|
||||
|
||||
Reference in New Issue
Block a user