summaryrefslogtreecommitdiffstats
path: root/drivers/net/phy/phy.c
diff options
context:
space:
mode:
authorSascha Hauer <s.hauer@pengutronix.de>2020-08-28 13:27:52 +0200
committerSascha Hauer <s.hauer@pengutronix.de>2020-10-01 08:32:19 +0200
commit13f237e2d84c875d9f4bcbdfe513a18a269ceaee (patch)
tree29f527ac7038d43c95e29f605af681cece3f670e /drivers/net/phy/phy.c
parent788619897249e6ad55f2d879cbea58e737852372 (diff)
downloadbarebox-13f237e2d84c875d9f4bcbdfe513a18a269ceaee.tar.gz
barebox-13f237e2d84c875d9f4bcbdfe513a18a269ceaee.tar.xz
net: phy: Add and use driver register macro
Add driver registration macros for phy drivers similar to the existing platform device macros. This also changes the initcall level from fs_initcall to device_initcall for the phy drivers. It is not clear why the phy driver have been at fs_initcall in the first place, changing it shouldn't be a problem. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'drivers/net/phy/phy.c')
-rw-r--r--drivers/net/phy/phy.c6
1 files changed, 1 insertions, 5 deletions
diff --git a/drivers/net/phy/phy.c b/drivers/net/phy/phy.c
index 57c2f8044f..622acbe40d 100644
--- a/drivers/net/phy/phy.c
+++ b/drivers/net/phy/phy.c
@@ -981,8 +981,4 @@ static struct phy_driver genphy_driver = {
SUPPORTED_BNC,
};
-static int generic_phy_register(void)
-{
- return phy_driver_register(&genphy_driver);
-}
-device_initcall(generic_phy_register);
+device_phy_driver(genphy_driver);