diff mbox series

Simplify the code by using module_platform_driver macro

Message ID 20210324023047.1337-1-tomstomsczc@163.com (mailing list archive)
State Accepted
Commit d280a2c2b740ed6d90827004625e605c0a06a696
Delegated to: Netdev Maintainers
Headers show
Series Simplify the code by using module_platform_driver macro | expand

Checks

Context Check Description
netdev/cover_letter success Link
netdev/fixes_present success Link
netdev/patch_count success Link
netdev/tree_selection success Guessed tree name to be net-next
netdev/subject_prefix warning Target tree name not specified in the subject
netdev/cc_maintainers warning 2 maintainers not CCed: zhangshengju@cmss.chinamobile.com tangbin@cmss.chinamobile.com
netdev/source_inline success Was 0 now: 0
netdev/verify_signedoff success Link
netdev/module_param success Was 0 now: 0
netdev/build_32bit success Errors and warnings before: 28 this patch: 28
netdev/kdoc success Errors and warnings before: 0 this patch: 0
netdev/verify_fixes success Link
netdev/checkpatch success total: 0 errors, 0 warnings, 0 checks, 19 lines checked
netdev/build_allmodconfig_warn success Errors and warnings before: 0 this patch: 0
netdev/header_inline success Link

Commit Message

Zhichao Cai March 24, 2021, 2:30 a.m. UTC
From: Zhichao Cai <caizhichao@yulong.com>

for ftmac100

Signed-off-by: Zhichao Cai <caizhichao@yulong.com>
---
 drivers/net/ethernet/faraday/ftmac100.c | 13 +------------
 1 file changed, 1 insertion(+), 12 deletions(-)

Comments

patchwork-bot+netdevbpf@kernel.org March 25, 2021, 1 a.m. UTC | #1
Hello:

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

On Wed, 24 Mar 2021 10:30:47 +0800 you wrote:
> From: Zhichao Cai <caizhichao@yulong.com>
> 
> for ftmac100
> 
> Signed-off-by: Zhichao Cai <caizhichao@yulong.com>
> ---
>  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
diff mbox series

Patch

diff --git a/drivers/net/ethernet/faraday/ftmac100.c b/drivers/net/ethernet/faraday/ftmac100.c
index 473b337..5a1a8f2 100644
--- a/drivers/net/ethernet/faraday/ftmac100.c
+++ b/drivers/net/ethernet/faraday/ftmac100.c
@@ -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 <ratbert@faraday-tech.com>");
 MODULE_DESCRIPTION("FTMAC100 driver");