Skip to contentSkip to conversation

Simplify the code by using module_platform_driver macro

PATCH Applied caizhichao 2 participants 2 messages Mar 24, 2021 – Mar 25, 2021

Subsystems (2)
lore
Share & tools
lore

caizhichao

author
#0 lore raw

PATCH 1/1 Simplify the code by using module_platform_driver macro

From: Zhichao Cai <[email protected]>

for ftmac100

---
 drivers/net/ethernet/faraday/ftmac100.c | 13 +------------
 1 file changed, 1 insertion(+), 12 deletions(-)
drivers/net/ethernet/faraday/ftmac100.c +1 -12
index 473b337..5a1a8f2 100644
@@ -1177,18 +1177,7 @@ static int ftmac100_remove(struct platform_device *pdev)
 /******************************************************************************
  * initialization / finalization
  *****************************************************************************/
-static int __init ftmac100_init(void)
-{
-	return platform_driver_register(&ftmac100_driver);
-}
-
-static void __exit ftmac100_exit(void)
-{
-	platform_driver_unregister(&ftmac100_driver);
-}
-
-module_init(ftmac100_init);
-module_exit(ftmac100_exit);
+module_platform_driver(ftmac100_driver);
 
 MODULE_AUTHOR("Po-Yu Chuang <[email protected]>");
 MODULE_DESCRIPTION("FTMAC100 driver");
Signature · 1 line
1.9.1
#1 lore raw
This patch was applied to netdev/net-next.git (refs/heads/master):

Hello:

This patch was applied to netdev/net-next.git (refs/heads/master):

Quoted 8 lines · On Wed, 24 Mar 2021 10:30:47 +0800 you wrote:

From: Zhichao Cai <[email protected]>

for ftmac100

---
 drivers/net/ethernet/faraday/ftmac100.c | 13 +------------
 1 file changed, 1 insertion(+), 12 deletions(-)

Here is the summary with links:
- Simplify the code by using module_platform_driver macro

    https://git.kernel.org/netdev/net-next/c/d280a2c2b740

You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html