aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/phy/phy-spear1340-miphy.c
diff options
context:
space:
mode:
authorPeter Griffin <peter.griffin@linaro.org>2014-08-15 08:40:16 -0400
committerKishon Vijay Abraham I <kishon@ti.com>2014-09-24 05:48:32 -0400
commit25451e5cb99d6e8ab848b9c2c277fef532240a5a (patch)
tree422540ecbc94f75a8d26f578f843032a7c7730cf /drivers/phy/phy-spear1340-miphy.c
parent7e65e9c94a0d8dba3a6e1e2052fca26d6ca853e7 (diff)
phy: phy-spear1340-miphy: Use module_platform_driver to register driver.
Using 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/phy-spear1340-miphy.c')
-rw-r--r--drivers/phy/phy-spear1340-miphy.c13
1 files changed, 1 insertions, 12 deletions
diff --git a/drivers/phy/phy-spear1340-miphy.c b/drivers/phy/phy-spear1340-miphy.c
index ee4d66f588e3..1ecd0945bad3 100644
--- a/drivers/phy/phy-spear1340-miphy.c
+++ b/drivers/phy/phy-spear1340-miphy.c
@@ -282,23 +282,12 @@ static struct platform_driver spear1340_miphy_driver = {
282 .probe = spear1340_miphy_probe, 282 .probe = spear1340_miphy_probe,
283 .driver = { 283 .driver = {
284 .name = "spear1340-miphy", 284 .name = "spear1340-miphy",
285 .owner = THIS_MODULE,
286 .pm = &spear1340_miphy_pm_ops, 285 .pm = &spear1340_miphy_pm_ops,
287 .of_match_table = of_match_ptr(spear1340_miphy_of_match), 286 .of_match_table = of_match_ptr(spear1340_miphy_of_match),
288 }, 287 },
289}; 288};
290 289
291static int __init spear1340_miphy_phy_init(void) 290module_platform_driver(spear1340_miphy_driver);
292{
293 return platform_driver_register(&spear1340_miphy_driver);
294}
295module_init(spear1340_miphy_phy_init);
296
297static void __exit spear1340_miphy_phy_exit(void)
298{
299 platform_driver_unregister(&spear1340_miphy_driver);
300}
301module_exit(spear1340_miphy_phy_exit);
302 291
303MODULE_DESCRIPTION("ST SPEAR1340-MIPHY driver"); 292MODULE_DESCRIPTION("ST SPEAR1340-MIPHY driver");
304MODULE_AUTHOR("Pratyush Anand <pratyush.anand@st.com>"); 293MODULE_AUTHOR("Pratyush Anand <pratyush.anand@st.com>");