diff options
author | Axel Lin <axel.lin@ingics.com> | 2015-10-14 06:30:48 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2015-10-14 22:01:16 -0400 |
commit | fb0801dcc17845ef52a19f9f9fbbb88a1a93f9b6 (patch) | |
tree | bbe7dbb3efed2cfee5e54a4bc04aeaf1a57ebdfb | |
parent | 7f0abb1f0f2b110ec38ade73c241fcba30f9112a (diff) |
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>
-rw-r--r-- | drivers/net/phy/aquantia.c | 15 | ||||
-rw-r--r-- | drivers/net/phy/teranetics.c | 15 |
2 files changed, 2 insertions, 28 deletions
diff --git a/drivers/net/phy/aquantia.c b/drivers/net/phy/aquantia.c index d6111affbcb6..f1936b7a7af6 100644 --- a/drivers/net/phy/aquantia.c +++ b/drivers/net/phy/aquantia.c | |||
@@ -171,20 +171,7 @@ static struct phy_driver aquantia_driver[] = { | |||
171 | }, | 171 | }, |
172 | }; | 172 | }; |
173 | 173 | ||
174 | static int __init aquantia_init(void) | 174 | module_phy_driver(aquantia_driver); |
175 | { | ||
176 | return phy_drivers_register(aquantia_driver, | ||
177 | ARRAY_SIZE(aquantia_driver)); | ||
178 | } | ||
179 | |||
180 | static void __exit aquantia_exit(void) | ||
181 | { | ||
182 | return phy_drivers_unregister(aquantia_driver, | ||
183 | ARRAY_SIZE(aquantia_driver)); | ||
184 | } | ||
185 | |||
186 | module_init(aquantia_init); | ||
187 | module_exit(aquantia_exit); | ||
188 | 175 | ||
189 | static struct mdio_device_id __maybe_unused aquantia_tbl[] = { | 176 | static struct mdio_device_id __maybe_unused aquantia_tbl[] = { |
190 | { PHY_ID_AQ1202, 0xfffffff0 }, | 177 | { PHY_ID_AQ1202, 0xfffffff0 }, |
diff --git a/drivers/net/phy/teranetics.c b/drivers/net/phy/teranetics.c index 91e1bec6079f..07463fcca212 100644 --- a/drivers/net/phy/teranetics.c +++ b/drivers/net/phy/teranetics.c | |||
@@ -112,20 +112,7 @@ static struct phy_driver teranetics_driver[] = { | |||
112 | }, | 112 | }, |
113 | }; | 113 | }; |
114 | 114 | ||
115 | static int __init teranetics_init(void) | 115 | module_phy_driver(teranetics_driver); |
116 | { | ||
117 | return phy_drivers_register(teranetics_driver, | ||
118 | ARRAY_SIZE(teranetics_driver)); | ||
119 | } | ||
120 | |||
121 | static void __exit teranetics_exit(void) | ||
122 | { | ||
123 | return phy_drivers_unregister(teranetics_driver, | ||
124 | ARRAY_SIZE(teranetics_driver)); | ||
125 | } | ||
126 | |||
127 | module_init(teranetics_init); | ||
128 | module_exit(teranetics_exit); | ||
129 | 116 | ||
130 | static struct mdio_device_id __maybe_unused teranetics_tbl[] = { | 117 | static struct mdio_device_id __maybe_unused teranetics_tbl[] = { |
131 | { PHY_ID_TN2020, 0xffffffff }, | 118 | { PHY_ID_TN2020, 0xffffffff }, |