mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-06-30 02:21:15 +00:00
net: phy: aquantia/teranetics: Convert to use module_phy_driver macro
Use module_phy_driver macro to simplify the code a bit. Signed-off-by: Axel Lin <axel.lin@ingics.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
7f0abb1f0f
commit
fb0801dcc1
2 changed files with 2 additions and 28 deletions
|
@ -171,20 +171,7 @@ static struct phy_driver aquantia_driver[] = {
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
static int __init aquantia_init(void)
|
module_phy_driver(aquantia_driver);
|
||||||
{
|
|
||||||
return phy_drivers_register(aquantia_driver,
|
|
||||||
ARRAY_SIZE(aquantia_driver));
|
|
||||||
}
|
|
||||||
|
|
||||||
static void __exit aquantia_exit(void)
|
|
||||||
{
|
|
||||||
return phy_drivers_unregister(aquantia_driver,
|
|
||||||
ARRAY_SIZE(aquantia_driver));
|
|
||||||
}
|
|
||||||
|
|
||||||
module_init(aquantia_init);
|
|
||||||
module_exit(aquantia_exit);
|
|
||||||
|
|
||||||
static struct mdio_device_id __maybe_unused aquantia_tbl[] = {
|
static struct mdio_device_id __maybe_unused aquantia_tbl[] = {
|
||||||
{ PHY_ID_AQ1202, 0xfffffff0 },
|
{ PHY_ID_AQ1202, 0xfffffff0 },
|
||||||
|
|
|
@ -112,20 +112,7 @@ static struct phy_driver teranetics_driver[] = {
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
static int __init teranetics_init(void)
|
module_phy_driver(teranetics_driver);
|
||||||
{
|
|
||||||
return phy_drivers_register(teranetics_driver,
|
|
||||||
ARRAY_SIZE(teranetics_driver));
|
|
||||||
}
|
|
||||||
|
|
||||||
static void __exit teranetics_exit(void)
|
|
||||||
{
|
|
||||||
return phy_drivers_unregister(teranetics_driver,
|
|
||||||
ARRAY_SIZE(teranetics_driver));
|
|
||||||
}
|
|
||||||
|
|
||||||
module_init(teranetics_init);
|
|
||||||
module_exit(teranetics_exit);
|
|
||||||
|
|
||||||
static struct mdio_device_id __maybe_unused teranetics_tbl[] = {
|
static struct mdio_device_id __maybe_unused teranetics_tbl[] = {
|
||||||
{ PHY_ID_TN2020, 0xffffffff },
|
{ PHY_ID_TN2020, 0xffffffff },
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue