From: varkabhadram@gmail.com
To: netdev@vger.kernel.org
Cc: davem@davemloft.net, Varka Bhadram <varkab@cdac.in>
Subject: [PATCH net-next 1/2] ethernet: realtek: use module_pci_driver
Date: Tue, 22 Jul 2014 11:28:47 +0530 [thread overview]
Message-ID: <1406008728-22604-2-git-send-email-varkabhadram@gmail.com> (raw)
In-Reply-To: <1406008728-22604-1-git-send-email-varkabhadram@gmail.com>
From: Varka Bhadram <varkab@cdac.in>
This patch converts to use the macro module_pci_driver, which makes
the code smaller and simpler.
Signed-off-by: Varka Bhadram <varkab@cdac.in>
---
drivers/net/ethernet/realtek/8139cp.c | 16 +---------------
1 file changed, 1 insertion(+), 15 deletions(-)
diff --git a/drivers/net/ethernet/realtek/8139cp.c b/drivers/net/ethernet/realtek/8139cp.c
index 2bc728e..9025fba 100644
--- a/drivers/net/ethernet/realtek/8139cp.c
+++ b/drivers/net/ethernet/realtek/8139cp.c
@@ -2121,18 +2121,4 @@ static struct pci_driver cp_driver = {
#endif
};
-static int __init cp_init (void)
-{
-#ifdef MODULE
- pr_info("%s", version);
-#endif
- return pci_register_driver(&cp_driver);
-}
-
-static void __exit cp_exit (void)
-{
- pci_unregister_driver (&cp_driver);
-}
-
-module_init(cp_init);
-module_exit(cp_exit);
+module_pci_driver(cp_driver);
--
1.7.9.5
next prev parent reply other threads:[~2014-07-22 6:00 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-07-22 5:58 [PATCH net-next 0/2] cleanup for realtek 8139CP varkabhadram
2014-07-22 5:58 ` varkabhadram [this message]
2014-07-22 5:58 ` [PATCH net-next 2/2] ethernet: realtek: use pci_device_id varkabhadram
2014-07-22 6:56 ` [PATCH net-next 0/2] cleanup for realtek 8139CP David Miller
2014-07-22 6:57 ` David Miller
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=1406008728-22604-2-git-send-email-varkabhadram@gmail.com \
--to=varkabhadram@gmail.com \
--cc=davem@davemloft.net \
--cc=netdev@vger.kernel.org \
--cc=varkab@cdac.in \
/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).