summaryrefslogtreecommitdiffstats
path: root/drivers/net/phy/national.c
diff options
context:
space:
mode:
authorJohan Hovold <johan@kernel.org>2014-11-11 19:45:58 +0100
committerDavid S. Miller <davem@davemloft.net>2014-11-12 13:52:53 -0500
commit116dffa0b543a2e560abd62a0b3207b1694f9ab9 (patch)
treebf26c3d107938367692f724596da9067cea09aa0 /drivers/net/phy/national.c
parentc31accd159a6477b91de61ae237dce38e3f3ee4d (diff)
downloadblackbird-obmc-linux-116dffa0b543a2e560abd62a0b3207b1694f9ab9.tar.gz
blackbird-obmc-linux-116dffa0b543a2e560abd62a0b3207b1694f9ab9.zip
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>
Diffstat (limited to 'drivers/net/phy/national.c')
-rw-r--r--drivers/net/phy/national.c17
1 files changed, 3 insertions, 14 deletions
diff --git a/drivers/net/phy/national.c b/drivers/net/phy/national.c
index 9a5f234d95b0..0a7b9c7f09a2 100644
--- a/drivers/net/phy/national.c
+++ b/drivers/net/phy/national.c
@@ -129,7 +129,7 @@ static int ns_config_init(struct phy_device *phydev)
return ns_ack_interrupt(phydev);
}
-static struct phy_driver dp83865_driver = {
+static struct phy_driver dp83865_driver[] = { {
.phy_id = DP83865_PHY_ID,
.phy_id_mask = 0xfffffff0,
.name = "NatSemi DP83865",
@@ -141,25 +141,14 @@ static struct phy_driver dp83865_driver = {
.ack_interrupt = ns_ack_interrupt,
.config_intr = ns_config_intr,
.driver = {.owner = THIS_MODULE,}
-};
+} };
-static int __init ns_init(void)
-{
- return phy_driver_register(&dp83865_driver);
-}
-
-static void __exit ns_exit(void)
-{
- phy_driver_unregister(&dp83865_driver);
-}
+module_phy_driver(dp83865_driver);
MODULE_DESCRIPTION("NatSemi PHY driver");
MODULE_AUTHOR("Stuart Menefy");
MODULE_LICENSE("GPL");
-module_init(ns_init);
-module_exit(ns_exit);
-
static struct mdio_device_id __maybe_unused ns_tbl[] = {
{ DP83865_PHY_ID, 0xfffffff0 },
{ }
OpenPOWER on IntegriCloud