diff options
author | dingsenjie <dingsenjie@yulong.com> | 2021-01-28 04:53:30 +0100 |
---|---|---|
committer | Jakub Kicinski <kuba@kernel.org> | 2021-01-30 04:02:43 +0100 |
commit | afa4f675aa62467f706f06b67d4c7955b362f949 (patch) | |
tree | be143525127a6ffd5bae1d6823698dd5d81af2db /drivers/net/ethernet/cavium/octeon | |
parent | net: atm: pppoatm: use new API for wakeup tasklet (diff) | |
download | linux-afa4f675aa62467f706f06b67d4c7955b362f949.tar.xz linux-afa4f675aa62467f706f06b67d4c7955b362f949.zip |
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>
Diffstat (limited to 'drivers/net/ethernet/cavium/octeon')
-rw-r--r-- | drivers/net/ethernet/cavium/octeon/octeon_mgmt.c | 13 |
1 files changed, 1 insertions, 12 deletions
diff --git a/drivers/net/ethernet/cavium/octeon/octeon_mgmt.c b/drivers/net/ethernet/cavium/octeon/octeon_mgmt.c index 5e50bb19bf26..ecffebd513be 100644 --- a/drivers/net/ethernet/cavium/octeon/octeon_mgmt.c +++ b/drivers/net/ethernet/cavium/octeon/octeon_mgmt.c @@ -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); |