diff options
| author | Peter Griffin <peter.griffin@linaro.org> | 2014-08-15 08:40:15 -0400 |
|---|---|---|
| committer | Kishon Vijay Abraham I <kishon@ti.com> | 2014-09-24 05:48:32 -0400 |
| commit | 7e65e9c94a0d8dba3a6e1e2052fca26d6ca853e7 (patch) | |
| tree | bb9c297108c34def1aa2d4ed0aa7fada953408b2 /drivers/phy | |
| parent | 556bdebb3bb155459d3ed1d0c23fdb34cd46af33 (diff) | |
phy: phy-spear1310-miphy: Use module_platform_driver to register driver.
Use the module_platform_driver macro to register the driver as this gets
rid of a lot of the boilerplate code.
Also remove .owner field as this gets overridden in __platform_driver_register.
Signed-off-by: Peter Griffin <peter.griffin@linaro.org>
Signed-off-by: Kishon Vijay Abraham I <kishon@ti.com>
Diffstat (limited to 'drivers/phy')
| -rw-r--r-- | drivers/phy/phy-spear1310-miphy.c | 13 |
1 files changed, 1 insertions, 12 deletions
diff --git a/drivers/phy/phy-spear1310-miphy.c b/drivers/phy/phy-spear1310-miphy.c index 911d25b53064..5f4c586ee951 100644 --- a/drivers/phy/phy-spear1310-miphy.c +++ b/drivers/phy/phy-spear1310-miphy.c | |||
| @@ -250,22 +250,11 @@ static struct platform_driver spear1310_miphy_driver = { | |||
| 250 | .probe = spear1310_miphy_probe, | 250 | .probe = spear1310_miphy_probe, |
| 251 | .driver = { | 251 | .driver = { |
| 252 | .name = "spear1310-miphy", | 252 | .name = "spear1310-miphy", |
| 253 | .owner = THIS_MODULE, | ||
| 254 | .of_match_table = of_match_ptr(spear1310_miphy_of_match), | 253 | .of_match_table = of_match_ptr(spear1310_miphy_of_match), |
| 255 | }, | 254 | }, |
| 256 | }; | 255 | }; |
| 257 | 256 | ||
| 258 | static int __init spear1310_miphy_phy_init(void) | 257 | module_platform_driver(spear1310_miphy_driver); |
| 259 | { | ||
| 260 | return platform_driver_register(&spear1310_miphy_driver); | ||
| 261 | } | ||
| 262 | module_init(spear1310_miphy_phy_init); | ||
| 263 | |||
| 264 | static void __exit spear1310_miphy_phy_exit(void) | ||
| 265 | { | ||
| 266 | platform_driver_unregister(&spear1310_miphy_driver); | ||
| 267 | } | ||
| 268 | module_exit(spear1310_miphy_phy_exit); | ||
| 269 | 258 | ||
| 270 | MODULE_DESCRIPTION("ST SPEAR1310-MIPHY driver"); | 259 | MODULE_DESCRIPTION("ST SPEAR1310-MIPHY driver"); |
| 271 | MODULE_AUTHOR("Pratyush Anand <pratyush.anand@st.com>"); | 260 | MODULE_AUTHOR("Pratyush Anand <pratyush.anand@st.com>"); |
