* [PATCH] atm: simplify lanai.c by using module_pci_driver
@ 2014-10-15 7:45 Michael Opdenacker
2014-10-17 15:55 ` David Miller
0 siblings, 1 reply; 2+ messages in thread
From: Michael Opdenacker @ 2014-10-15 7:45 UTC (permalink / raw)
To: chas; +Cc: linux-atm-general, netdev, linux-kernel, Michael Opdenacker
This simplifies the lanai.c driver by using
the module_pci_driver() macro, at the expense
of losing only debugging messages.
Signed-off-by: Michael Opdenacker <michael.opdenacker@free-electrons.com>
---
drivers/atm/lanai.c | 22 +---------------------
1 file changed, 1 insertion(+), 21 deletions(-)
diff --git a/drivers/atm/lanai.c b/drivers/atm/lanai.c
index fa7d701933ba..93eaf8d94492 100644
--- a/drivers/atm/lanai.c
+++ b/drivers/atm/lanai.c
@@ -2614,27 +2614,7 @@ static struct pci_driver lanai_driver = {
.probe = lanai_init_one,
};
-static int __init lanai_module_init(void)
-{
- int x;
-
- x = pci_register_driver(&lanai_driver);
- if (x != 0)
- printk(KERN_ERR DEV_LABEL ": no adapter found\n");
- return x;
-}
-
-static void __exit lanai_module_exit(void)
-{
- /* We'll only get called when all the interfaces are already
- * gone, so there isn't much to do
- */
- DPRINTK("cleanup_module()\n");
- pci_unregister_driver(&lanai_driver);
-}
-
-module_init(lanai_module_init);
-module_exit(lanai_module_exit);
+module_pci_driver(lanai_driver);
MODULE_AUTHOR("Mitchell Blank Jr <mitch@sfgoth.com>");
MODULE_DESCRIPTION("Efficient Networks Speedstream 3010 driver");
--
1.9.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] atm: simplify lanai.c by using module_pci_driver
2014-10-15 7:45 [PATCH] atm: simplify lanai.c by using module_pci_driver Michael Opdenacker
@ 2014-10-17 15:55 ` David Miller
0 siblings, 0 replies; 2+ messages in thread
From: David Miller @ 2014-10-17 15:55 UTC (permalink / raw)
To: michael.opdenacker; +Cc: chas, linux-atm-general, netdev, linux-kernel
From: Michael Opdenacker <michael.opdenacker@free-electrons.com>
Date: Wed, 15 Oct 2014 09:45:50 +0200
> This simplifies the lanai.c driver by using
> the module_pci_driver() macro, at the expense
> of losing only debugging messages.
>
> Signed-off-by: Michael Opdenacker <michael.opdenacker@free-electrons.com>
Applied, thanks.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2014-10-17 15:55 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-10-15 7:45 [PATCH] atm: simplify lanai.c by using module_pci_driver Michael Opdenacker
2014-10-17 15:55 ` David Miller
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).