From: dingsenjie@163.com
To: davem@davemloft.net, kuba@kernel.org, andrew@lunn.ch, leon@kernel.org
Cc: netdev@vger.kernel.org, linux-kernel@vger.kernel.org,
dingsenjie <dingsenjie@yulong.com>
Subject: [PATCH] net/ethernet: convert to use module_platform_driver in octeon_mgmt.c
Date: Thu, 28 Jan 2021 11:53:30 +0800 [thread overview]
Message-ID: <20210128035330.17676-1-dingsenjie@163.com> (raw)
From: dingsenjie <dingsenjie@yulong.com>
Simplify the code by using module_platform_driver macro
for octeon_mgmt.
Signed-off-by: dingsenjie <dingsenjie@yulong.com>
---
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
next reply other threads:[~2021-01-28 9:40 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-01-28 3:53 dingsenjie [this message]
2021-01-30 3:20 ` [PATCH] net/ethernet: convert to use module_platform_driver in octeon_mgmt.c patchwork-bot+netdevbpf
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20210128035330.17676-1-dingsenjie@163.com \
--to=dingsenjie@163.com \
--cc=andrew@lunn.ch \
--cc=davem@davemloft.net \
--cc=dingsenjie@yulong.com \
--cc=kuba@kernel.org \
--cc=leon@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).