Commit afa4f675 authored by dingsenjie's avatar dingsenjie Committed by Jakub Kicinski

net/ethernet: convert to use module_platform_driver in octeon_mgmt.c

Simplify the code by using module_platform_driver macro
for octeon_mgmt.
Signed-off-by: default avatardingsenjie <dingsenjie@yulong.com>
Link: https://lore.kernel.org/r/20210128035330.17676-1-dingsenjie@163.comSigned-off-by: default avatarJakub Kicinski <kuba@kernel.org>
parent a5874597
......@@ -1556,18 +1556,7 @@ static struct platform_driver octeon_mgmt_driver = {
.remove = octeon_mgmt_remove,
};
static int __init octeon_mgmt_mod_init(void)
{
return platform_driver_register(&octeon_mgmt_driver);
}
static void __exit octeon_mgmt_mod_exit(void)
{
platform_driver_unregister(&octeon_mgmt_driver);
}
module_init(octeon_mgmt_mod_init);
module_exit(octeon_mgmt_mod_exit);
module_platform_driver(octeon_mgmt_driver);
MODULE_SOFTDEP("pre: mdio-cavium");
MODULE_DESCRIPTION(DRV_DESCRIPTION);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment