summaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorMichael Opdenacker <michael.opdenacker@free-electrons.com>2014-10-15 09:45:50 +0200
committerDavid S. Miller <davem@davemloft.net>2014-10-17 11:55:32 -0400
commitb7983e3f89dd960b2a6d156fd2200548c3300428 (patch)
tree91cde46bdcd8a183402ae16ba6fb227be3ca0f1e /drivers
parent2c6ba4b15b5ef38213b6c42ce09e9398f78cef9f (diff)
downloadop-kernel-dev-b7983e3f89dd960b2a6d156fd2200548c3300428.zip
op-kernel-dev-b7983e3f89dd960b2a6d156fd2200548c3300428.tar.gz
atm: simplify lanai.c by using module_pci_driver
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> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/atm/lanai.c22
1 files changed, 1 insertions, 21 deletions
diff --git a/drivers/atm/lanai.c b/drivers/atm/lanai.c
index fa7d701..93eaf8d 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");
OpenPOWER on IntegriCloud