From: Peter Huewe <peterhuewe@gmx.de>
To: "David S. Miller" <davem@davemloft.net>
Cc: Peter Huewe <peterhuewe@gmx.de>,
Ralf Baechle <ralf@linux-mips.org>,
linux-mips@linux-mips.org (open list:IOC3 ETHERNET DRIVER),
netdev@vger.kernel.org (open list:NETWORKING DRIVERS),
linux-kernel@vger.kernel.org (open list)
Subject: [PATCH 12/19] net/ethernet/sgi/ioc3-eth: Use module_pci_driver to register driver
Date: Wed, 22 May 2013 00:58:07 +0200 [thread overview]
Message-ID: <1369177096-19674-12-git-send-email-peterhuewe@gmx.de> (raw)
In-Reply-To: <1369176146-19383-1-git-send-email-peterhuewe@gmx.de>
Removing some boilerplate by using module_pci_driver instead of calling
register and unregister in the otherwise empty init/exit functions.
Signed-off-by: Peter Huewe <peterhuewe@gmx.de>
---
drivers/net/ethernet/sgi/ioc3-eth.c | 14 +-------------
1 file changed, 1 insertion(+), 13 deletions(-)
diff --git a/drivers/net/ethernet/sgi/ioc3-eth.c b/drivers/net/ethernet/sgi/ioc3-eth.c
index 7ed08c3..ffa7843 100644
--- a/drivers/net/ethernet/sgi/ioc3-eth.c
+++ b/drivers/net/ethernet/sgi/ioc3-eth.c
@@ -1398,16 +1398,6 @@ static struct pci_driver ioc3_driver = {
.remove = ioc3_remove_one,
};
-static int __init ioc3_init_module(void)
-{
- return pci_register_driver(&ioc3_driver);
-}
-
-static void __exit ioc3_cleanup_module(void)
-{
- pci_unregister_driver(&ioc3_driver);
-}
-
static int ioc3_start_xmit(struct sk_buff *skb, struct net_device *dev)
{
unsigned long data;
@@ -1677,9 +1667,7 @@ static void ioc3_set_multicast_list(struct net_device *dev)
netif_wake_queue(dev); /* Let us get going again. */
}
+module_pci_driver(ioc3_driver);
MODULE_AUTHOR("Ralf Baechle <ralf@linux-mips.org>");
MODULE_DESCRIPTION("SGI IOC3 Ethernet driver");
MODULE_LICENSE("GPL");
-
-module_init(ioc3_init_module);
-module_exit(ioc3_cleanup_module);
--
1.8.1.5
next prev parent reply other threads:[~2013-05-21 22:53 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-05-21 22:42 [PATCH 01/19] net/ethernet/silan/sc92031: " Peter Huewe
2013-05-21 22:42 ` [PATCH 02/19] net/ethernet/atheros/atl1c/atl1c_main: " Peter Huewe
2013-05-21 22:42 ` [PATCH 03/19] net/ethernet/atheros/atl1e/atl1e_main: " Peter Huewe
2013-05-22 0:19 ` Hannes Frederic Sowa
2013-05-21 22:42 ` [PATCH 04/19] net/ethernet/atheros/atlx/atl1: " Peter Huewe
2013-05-21 22:42 ` [PATCH 05/19] net/ethernet/sis/sis190: " Peter Huewe
2013-05-21 22:42 ` [PATCH 06/19] net/ethernet/dec/tulip/xircom_cb: " Peter Huewe
2013-05-22 0:41 ` Grant Grundler
2013-05-21 22:42 ` [PATCH 07/19] net/ethernet/toshiba/tc35815: " Peter Huewe
2013-05-21 22:42 ` [PATCH 08/19] net/ethernet/icplus/ipg: " Peter Huewe
2013-05-21 22:42 ` [PATCH 09/19] net/ethernet/alteon/acenic: " Peter Huewe
2013-05-21 22:58 ` [PATCH 10/19] net/ethernet/broadcom/bnx2: " Peter Huewe
2013-05-21 22:58 ` [PATCH 11/19] net/ethernet/broadcom/tg3: " Peter Huewe
2013-05-22 0:22 ` Nithin Nayak Sujir
2013-05-21 22:58 ` Peter Huewe [this message]
2013-05-22 7:53 ` [PATCH 12/19] net/ethernet/sgi/ioc3-eth: " Ralf Baechle
2013-05-21 22:58 ` [PATCH 13/19] net/ethernet/qlogic/qlge/qlge_main: " Peter Huewe
2013-05-21 22:58 ` [PATCH 14/19] net/ethernet/sun/sungem: " Peter Huewe
2013-05-21 22:58 ` [PATCH 15/19] net/ethernet/amd/amd8111e: " Peter Huewe
2013-05-21 23:42 ` [PATCH 16/19] net/hippi/rrunner: " Peter Huewe
2013-05-21 23:42 ` [PATCH 17/19] net/fddi/skfp/skfddi: " Peter Huewe
2013-05-21 23:42 ` [PATCH 18/19] net/ethernet/chelsio/cxgb/cxgb2: " Peter Huewe
2013-05-21 23:42 ` [PATCH 19/19] net/ethernet/nvidia/forcedeth: " Peter Huewe
2013-05-22 21:44 ` [PATCH 01/19] net/ethernet/silan/sc92031: " 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=1369177096-19674-12-git-send-email-peterhuewe@gmx.de \
--to=peterhuewe@gmx.de \
--cc=davem@davemloft.net \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mips@linux-mips.org \
--cc=netdev@vger.kernel.org \
--cc=ralf@linux-mips.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
all inboxes | Powered by JetHome®