net: phy: replace phy_driver_register calls

Replace module init/exit which only calls phy_driver_register with
module_phy_driver macro.

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:
Johan Hovold
2014-11-11 19:45:58 +01:00
committed by David S. Miller
parent c31accd159
commit 116dffa0b5
4 changed files with 12 additions and 56 deletions

View File

@@ -61,7 +61,7 @@ static int am79c_config_intr(struct phy_device *phydev)
return err;
}
static struct phy_driver am79c_driver = {
static struct phy_driver am79c_driver[] = { {
.phy_id = PHY_ID_AM79C874,
.name = "AM79C874",
.phy_id_mask = 0xfffffff0,
@@ -73,20 +73,9 @@ static struct phy_driver am79c_driver = {
.ack_interrupt = am79c_ack_interrupt,
.config_intr = am79c_config_intr,
.driver = { .owner = THIS_MODULE,},
};
} };
static int __init am79c_init(void)
{
return phy_driver_register(&am79c_driver);
}
static void __exit am79c_exit(void)
{
phy_driver_unregister(&am79c_driver);
}
module_init(am79c_init);
module_exit(am79c_exit);
module_phy_driver(am79c_driver);
static struct mdio_device_id __maybe_unused amd_tbl[] = {
{ PHY_ID_AM79C874, 0xfffffff0 },