diff options
author | dingsenjie <dingsenjie@yulong.com> | 2021-01-28 06:53:30 +0300 |
---|---|---|
committer | Jakub Kicinski <kuba@kernel.org> | 2021-01-30 06:02:43 +0300 |
commit | afa4f675aa62467f706f06b67d4c7955b362f949 (patch) | |
tree | be143525127a6ffd5bae1d6823698dd5d81af2db /drivers/net/ethernet/cavium/octeon/octeon_mgmt.c | |
parent | a58745979cdd2ad70cd43ce9f1de8b076ae98e21 (diff) | |
download | linux-afa4f675aa62467f706f06b67d4c7955b362f949.tar.xz |
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/octeon_mgmt.c')
-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); |