mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-10-03 07:38:10 +00:00
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>
This commit is contained in:
parent
7e65e9c94a
commit
25451e5cb9
1 changed files with 1 additions and 12 deletions
|
@ -282,23 +282,12 @@ static struct platform_driver spear1340_miphy_driver = {
|
||||||
.probe = spear1340_miphy_probe,
|
.probe = spear1340_miphy_probe,
|
||||||
.driver = {
|
.driver = {
|
||||||
.name = "spear1340-miphy",
|
.name = "spear1340-miphy",
|
||||||
.owner = THIS_MODULE,
|
|
||||||
.pm = &spear1340_miphy_pm_ops,
|
.pm = &spear1340_miphy_pm_ops,
|
||||||
.of_match_table = of_match_ptr(spear1340_miphy_of_match),
|
.of_match_table = of_match_ptr(spear1340_miphy_of_match),
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
static int __init spear1340_miphy_phy_init(void)
|
module_platform_driver(spear1340_miphy_driver);
|
||||||
{
|
|
||||||
return platform_driver_register(&spear1340_miphy_driver);
|
|
||||||
}
|
|
||||||
module_init(spear1340_miphy_phy_init);
|
|
||||||
|
|
||||||
static void __exit spear1340_miphy_phy_exit(void)
|
|
||||||
{
|
|
||||||
platform_driver_unregister(&spear1340_miphy_driver);
|
|
||||||
}
|
|
||||||
module_exit(spear1340_miphy_phy_exit);
|
|
||||||
|
|
||||||
MODULE_DESCRIPTION("ST SPEAR1340-MIPHY driver");
|
MODULE_DESCRIPTION("ST SPEAR1340-MIPHY driver");
|
||||||
MODULE_AUTHOR("Pratyush Anand <pratyush.anand@st.com>");
|
MODULE_AUTHOR("Pratyush Anand <pratyush.anand@st.com>");
|
||||||
|
|
Loading…
Reference in a new issue