Skip to content

Commit

Permalink
atm: simplify lanai.c by using module_pci_driver
Browse files Browse the repository at this point in the history
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 <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
  • Loading branch information
Michael Opdenacker authored and davem330 committed Oct 17, 2014
1 parent 2c6ba4b commit b7983e3
Showing 1 changed file with 1 addition and 21 deletions.
22 changes: 1 addition & 21 deletions drivers/atm/lanai.c
Original file line number Diff line number Diff line change
Expand Up @@ -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 <[email protected]>");
MODULE_DESCRIPTION("Efficient Networks Speedstream 3010 driver");
Expand Down

0 comments on commit b7983e3

Please sign in to comment.