mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-12-03 09:04:21 +08:00
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:
parent
a58745979c
commit
afa4f675aa
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user