Commit fb7944b3 authored by Axel Lin's avatar Axel Lin Committed by Marc Kleine-Budde

net/can: use module_pci_driver

This patch converts the drivers in drivers/net/can/* to use
module_pci_driver() macro which makes the code smaller and a bit simpler.
Signed-off-by: default avatarAxel Lin <axel.lin@gmail.com>
Cc: Wolfgang Grandegger <wg@grandegger.com>
Cc: Marc Kleine-Budde <mkl@pengutronix.de>
Cc: "David S. Miller" <davem@davemloft.net>
Cc: linux-can@vger.kernel.org
Signed-off-by: default avatarMarc Kleine-Budde <mkl@pengutronix.de>
parent a75afd47
...@@ -1274,17 +1274,7 @@ static struct pci_driver pch_can_pci_driver = { ...@@ -1274,17 +1274,7 @@ static struct pci_driver pch_can_pci_driver = {
.resume = pch_can_resume, .resume = pch_can_resume,
}; };
static int __init pch_can_pci_init(void) module_pci_driver(pch_can_pci_driver);
{
return pci_register_driver(&pch_can_pci_driver);
}
module_init(pch_can_pci_init);
static void __exit pch_can_pci_exit(void)
{
pci_unregister_driver(&pch_can_pci_driver);
}
module_exit(pch_can_pci_exit);
MODULE_DESCRIPTION("Intel EG20T PCH CAN(Controller Area Network) Driver"); MODULE_DESCRIPTION("Intel EG20T PCH CAN(Controller Area Network) Driver");
MODULE_LICENSE("GPL v2"); MODULE_LICENSE("GPL v2");
......
...@@ -371,16 +371,4 @@ static struct pci_driver ems_pci_driver = { ...@@ -371,16 +371,4 @@ static struct pci_driver ems_pci_driver = {
.remove = ems_pci_del_card, .remove = ems_pci_del_card,
}; };
static int __init ems_pci_init(void) module_pci_driver(ems_pci_driver);
{
return pci_register_driver(&ems_pci_driver);
}
static void __exit ems_pci_exit(void)
{
pci_unregister_driver(&ems_pci_driver);
}
module_init(ems_pci_init);
module_exit(ems_pci_exit);
...@@ -397,15 +397,4 @@ static struct pci_driver kvaser_pci_driver = { ...@@ -397,15 +397,4 @@ static struct pci_driver kvaser_pci_driver = {
.remove = __devexit_p(kvaser_pci_remove_one), .remove = __devexit_p(kvaser_pci_remove_one),
}; };
static int __init kvaser_pci_init(void) module_pci_driver(kvaser_pci_driver);
{
return pci_register_driver(&kvaser_pci_driver);
}
static void __exit kvaser_pci_exit(void)
{
pci_unregister_driver(&kvaser_pci_driver);
}
module_init(kvaser_pci_init);
module_exit(kvaser_pci_exit);
...@@ -749,14 +749,4 @@ static struct pci_driver peak_pci_driver = { ...@@ -749,14 +749,4 @@ static struct pci_driver peak_pci_driver = {
.remove = __devexit_p(peak_pci_remove), .remove = __devexit_p(peak_pci_remove),
}; };
static int __init peak_pci_init(void) module_pci_driver(peak_pci_driver);
{
return pci_register_driver(&peak_pci_driver);
}
module_init(peak_pci_init);
static void __exit peak_pci_exit(void)
{
pci_unregister_driver(&peak_pci_driver);
}
module_exit(peak_pci_exit);
...@@ -609,15 +609,4 @@ static struct pci_driver plx_pci_driver = { ...@@ -609,15 +609,4 @@ static struct pci_driver plx_pci_driver = {
.remove = plx_pci_del_card, .remove = plx_pci_del_card,
}; };
static int __init plx_pci_init(void) module_pci_driver(plx_pci_driver);
{
return pci_register_driver(&plx_pci_driver);
}
static void __exit plx_pci_exit(void)
{
pci_unregister_driver(&plx_pci_driver);
}
module_init(plx_pci_init);
module_exit(plx_pci_exit);
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment