From: dingsenjie <[email protected]>
Simplify the code by using module_platform_driver macro
for octeon_mgmt.
Signed-off-by: dingsenjie <[email protected]>
---
drivers/net/ethernet/cavium/octeon/octeon_mgmt.c | 13 +------------
1 file changed, 1 insertion(+), 12 deletions(-)
diff --git a/drivers/net/ethernet/cavium/octeon/octeon_mgmt.c b/drivers/net/ethernet/cavium/octeon/octeon_mgmt.c
index 5e50bb1..ecffebd 100644
--- a/drivers/net/ethernet/cavium/octeon/octeon_mgmt.c
+++ b/drivers/net/ethernet/cavium/octeon/octeon_mgmt.c
@@ -1556,18 +1556,7 @@ static int octeon_mgmt_remove(struct platform_device *pdev)
.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);
--
1.9.1
Hello:
This patch was applied to netdev/net-next.git (refs/heads/master):
On Thu, 28 Jan 2021 11:53:30 +0800 you wrote:
> From: dingsenjie <[email protected]>
>
> Simplify the code by using module_platform_driver macro
> for octeon_mgmt.
>
> Signed-off-by: dingsenjie <[email protected]>
>
> [...]
Here is the summary with links:
- net/ethernet: convert to use module_platform_driver in octeon_mgmt.c
https://git.kernel.org/netdev/net-next/c/afa4f675aa62
You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html