* [PATCH] Simplify the code by using module_platform_driver macro
@ 2021-03-24 2:30 caizhichao
2021-03-25 1:00 ` patchwork-bot+netdevbpf
0 siblings, 1 reply; 2+ messages in thread
From: caizhichao @ 2021-03-24 2:30 UTC (permalink / raw)
To: davem, kuba; +Cc: netdev, linux-kernel, Zhichao Cai
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(-)
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");
--
1.9.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] Simplify the code by using module_platform_driver macro
2021-03-24 2:30 [PATCH] Simplify the code by using module_platform_driver macro caizhichao
@ 2021-03-25 1:00 ` patchwork-bot+netdevbpf
0 siblings, 0 replies; 2+ messages in thread
From: patchwork-bot+netdevbpf @ 2021-03-25 1:00 UTC (permalink / raw)
To: Zhichao Cai; +Cc: davem, kuba, netdev, linux-kernel, caizhichao
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
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2021-03-25 1:00 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-03-24 2:30 [PATCH] Simplify the code by using module_platform_driver macro caizhichao
2021-03-25 1:00 ` patchwork-bot+netdevbpf
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).