summaryrefslogtreecommitdiffstats
path: root/drivers/net/can/pch_can.c
diff options
context:
space:
mode:
authorAxel Lin <axel.lin@gmail.com>2012-04-14 06:38:43 +0200
committerMarc Kleine-Budde <mkl@pengutronix.de>2012-04-16 21:08:18 +0200
commitfb7944b36931d77ea2cde061ff714415ef6e4cef (patch)
tree3d2cf39d8d7d607d0d482783f311841cb3f2424d /drivers/net/can/pch_can.c
parentcan: fix sparse warning for cgw_list (diff)
downloadlinux-fb7944b36931d77ea2cde061ff714415ef6e4cef.tar.xz
linux-fb7944b36931d77ea2cde061ff714415ef6e4cef.zip
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: Axel 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: Marc Kleine-Budde <mkl@pengutronix.de>
Diffstat (limited to 'drivers/net/can/pch_can.c')
-rw-r--r--drivers/net/can/pch_can.c12
1 files changed, 1 insertions, 11 deletions
diff --git a/drivers/net/can/pch_can.c b/drivers/net/can/pch_can.c
index 2bb215e00eb1..1226297e7676 100644
--- a/drivers/net/can/pch_can.c
+++ b/drivers/net/can/pch_can.c
@@ -1274,17 +1274,7 @@ static struct pci_driver pch_can_pci_driver = {
.resume = pch_can_resume,
};
-static int __init pch_can_pci_init(void)
-{
- 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_pci_driver(pch_can_pci_driver);
MODULE_DESCRIPTION("Intel EG20T PCH CAN(Controller Area Network) Driver");
MODULE_LICENSE("GPL v2");