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: dingsenjie <dingsenjie@yulong.com>
Link: https://lore.kernel.org/r/20210128035330.17676-1-dingsenjie@163.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
This commit is contained in:
dingsenjie 2021-01-28 11:53:30 +08:00 committed by Jakub Kicinski
parent a58745979c
commit afa4f675aa

View File

@ -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);