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>
This commit is contained in:
Peter Griffin 2014-08-15 13:40:15 +01:00 committed by Kishon Vijay Abraham I
parent 556bdebb3b
commit 7e65e9c94a

View file

@ -250,22 +250,11 @@ static struct platform_driver spear1310_miphy_driver = {
.probe = spear1310_miphy_probe, .probe = spear1310_miphy_probe,
.driver = { .driver = {
.name = "spear1310-miphy", .name = "spear1310-miphy",
.owner = THIS_MODULE,
.of_match_table = of_match_ptr(spear1310_miphy_of_match), .of_match_table = of_match_ptr(spear1310_miphy_of_match),
}, },
}; };
static int __init spear1310_miphy_phy_init(void) module_platform_driver(spear1310_miphy_driver);
{
return platform_driver_register(&spear1310_miphy_driver);
}
module_init(spear1310_miphy_phy_init);
static void __exit spear1310_miphy_phy_exit(void)
{
platform_driver_unregister(&spear1310_miphy_driver);
}
module_exit(spear1310_miphy_phy_exit);
MODULE_DESCRIPTION("ST SPEAR1310-MIPHY driver"); MODULE_DESCRIPTION("ST SPEAR1310-MIPHY driver");
MODULE_AUTHOR("Pratyush Anand <pratyush.anand@st.com>"); MODULE_AUTHOR("Pratyush Anand <pratyush.anand@st.com>");