Skip to content

Commit

Permalink
net/tokenring: use module_pci_driver
Browse files Browse the repository at this point in the history
This patch converts the drivers in drivers/net/tokenring/* to use
module_pci_driver() macro which makes the code smaller and a bit simpler.

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Cc: "David S. Miller" <davem@davemloft.net>
Cc: David Howells <dhowells@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Axel Lin authored and David S. Miller committed Apr 14, 2012
1 parent 7f83560 commit a680b30
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 48 deletions.
14 changes: 1 addition & 13 deletions drivers/net/tokenring/3c359.c
Original file line number Diff line number Diff line change
Expand Up @@ -1826,18 +1826,6 @@ static struct pci_driver xl_3c359_driver = {
.remove = __devexit_p(xl_remove_one),
};

static int __init xl_pci_init (void)
{
return pci_register_driver(&xl_3c359_driver);
}


static void __exit xl_pci_cleanup (void)
{
pci_unregister_driver (&xl_3c359_driver);
}

module_init(xl_pci_init);
module_exit(xl_pci_cleanup);
module_pci_driver(xl_3c359_driver);

MODULE_LICENSE("GPL") ;
10 changes: 1 addition & 9 deletions drivers/net/tokenring/lanstreamer.c
Original file line number Diff line number Diff line change
Expand Up @@ -1904,14 +1904,6 @@ static struct pci_driver streamer_pci_driver = {
.remove = __devexit_p(streamer_remove_one),
};

static int __init streamer_init_module(void) {
return pci_register_driver(&streamer_pci_driver);
}

static void __exit streamer_cleanup_module(void) {
pci_unregister_driver(&streamer_pci_driver);
}
module_pci_driver(streamer_pci_driver);

module_init(streamer_init_module);
module_exit(streamer_cleanup_module);
MODULE_LICENSE("GPL");
14 changes: 1 addition & 13 deletions drivers/net/tokenring/olympic.c
Original file line number Diff line number Diff line change
Expand Up @@ -1732,18 +1732,6 @@ static struct pci_driver olympic_driver = {
.remove = __devexit_p(olympic_remove_one),
};

static int __init olympic_pci_init(void)
{
return pci_register_driver(&olympic_driver) ;
}

static void __exit olympic_pci_cleanup(void)
{
pci_unregister_driver(&olympic_driver) ;
}


module_init(olympic_pci_init) ;
module_exit(olympic_pci_cleanup) ;
module_pci_driver(olympic_driver);

MODULE_LICENSE("GPL");
14 changes: 1 addition & 13 deletions drivers/net/tokenring/tmspci.c
Original file line number Diff line number Diff line change
Expand Up @@ -233,16 +233,4 @@ static struct pci_driver tms_pci_driver = {
.remove = __devexit_p(tms_pci_detach),
};

static int __init tms_pci_init (void)
{
return pci_register_driver(&tms_pci_driver);
}

static void __exit tms_pci_rmmod (void)
{
pci_unregister_driver (&tms_pci_driver);
}

module_init(tms_pci_init);
module_exit(tms_pci_rmmod);

module_pci_driver(tms_pci_driver);

0 comments on commit a680b30

Please sign in to comment.