summaryrefslogtreecommitdiffstats
path: root/drivers/firewire/nosy.c
diff options
context:
space:
mode:
authorAxel Lin <axel.lin@gmail.com>2012-04-03 10:07:01 +0800
committerStefan Richter <stefanr@s5r6.in-berlin.de>2012-04-09 14:23:37 +0200
commitfe2af11c220c7bb3a67f7aec0594811e5c59e019 (patch)
tree426d3d99ed35f7693db833d9dc2ef2be323b6a07 /drivers/firewire/nosy.c
parent0034102808e0dbbf3a2394b82b1bb40b5778de9e (diff)
downloadlinux-fe2af11c220c7bb3a67f7aec0594811e5c59e019.tar.gz
linux-fe2af11c220c7bb3a67f7aec0594811e5c59e019.tar.bz2
linux-fe2af11c220c7bb3a67f7aec0594811e5c59e019.zip
firewire: use module_pci_driver
This patch converts the drivers in drivers/firewire/* to use module_pci_driver() macro which makes the code smaller and a bit simpler. Signed-off-by: Axel Lin <axel.lin@gmail.com> Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
Diffstat (limited to 'drivers/firewire/nosy.c')
-rw-r--r--drivers/firewire/nosy.c20
1 files changed, 4 insertions, 16 deletions
diff --git a/drivers/firewire/nosy.c b/drivers/firewire/nosy.c
index a7c4422a688e..4ebfb2273672 100644
--- a/drivers/firewire/nosy.c
+++ b/drivers/firewire/nosy.c
@@ -693,6 +693,8 @@ static struct pci_device_id pci_table[] __devinitdata = {
{ } /* Terminating entry */
};
+MODULE_DEVICE_TABLE(pci, pci_table);
+
static struct pci_driver lynx_pci_driver = {
.name = driver_name,
.id_table = pci_table,
@@ -700,22 +702,8 @@ static struct pci_driver lynx_pci_driver = {
.remove = remove_card,
};
+module_pci_driver(lynx_pci_driver);
+
MODULE_AUTHOR("Kristian Hoegsberg");
MODULE_DESCRIPTION("Snoop mode driver for TI pcilynx 1394 controllers");
MODULE_LICENSE("GPL");
-MODULE_DEVICE_TABLE(pci, pci_table);
-
-static int __init nosy_init(void)
-{
- return pci_register_driver(&lynx_pci_driver);
-}
-
-static void __exit nosy_cleanup(void)
-{
- pci_unregister_driver(&lynx_pci_driver);
-
- pr_info("Unloaded %s\n", driver_name);
-}
-
-module_init(nosy_init);
-module_exit(nosy_cleanup);