diff options
author | Axel Lin <axel.lin@gmail.com> | 2012-04-02 22:07:01 -0400 |
---|---|---|
committer | Stefan Richter <stefanr@s5r6.in-berlin.de> | 2012-04-09 08:23:37 -0400 |
commit | fe2af11c220c7bb3a67f7aec0594811e5c59e019 (patch) | |
tree | 426d3d99ed35f7693db833d9dc2ef2be323b6a07 /drivers/firewire/nosy.c | |
parent | 0034102808e0dbbf3a2394b82b1bb40b5778de9e (diff) |
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.c | 20 |
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 = { | |||
693 | { } /* Terminating entry */ | 693 | { } /* Terminating entry */ |
694 | }; | 694 | }; |
695 | 695 | ||
696 | MODULE_DEVICE_TABLE(pci, pci_table); | ||
697 | |||
696 | static struct pci_driver lynx_pci_driver = { | 698 | static struct pci_driver lynx_pci_driver = { |
697 | .name = driver_name, | 699 | .name = driver_name, |
698 | .id_table = pci_table, | 700 | .id_table = pci_table, |
@@ -700,22 +702,8 @@ static struct pci_driver lynx_pci_driver = { | |||
700 | .remove = remove_card, | 702 | .remove = remove_card, |
701 | }; | 703 | }; |
702 | 704 | ||
705 | module_pci_driver(lynx_pci_driver); | ||
706 | |||
703 | MODULE_AUTHOR("Kristian Hoegsberg"); | 707 | MODULE_AUTHOR("Kristian Hoegsberg"); |
704 | MODULE_DESCRIPTION("Snoop mode driver for TI pcilynx 1394 controllers"); | 708 | MODULE_DESCRIPTION("Snoop mode driver for TI pcilynx 1394 controllers"); |
705 | MODULE_LICENSE("GPL"); | 709 | MODULE_LICENSE("GPL"); |
706 | MODULE_DEVICE_TABLE(pci, pci_table); | ||
707 | |||
708 | static int __init nosy_init(void) | ||
709 | { | ||
710 | return pci_register_driver(&lynx_pci_driver); | ||
711 | } | ||
712 | |||
713 | static void __exit nosy_cleanup(void) | ||
714 | { | ||
715 | pci_unregister_driver(&lynx_pci_driver); | ||
716 | |||
717 | pr_info("Unloaded %s\n", driver_name); | ||
718 | } | ||
719 | |||
720 | module_init(nosy_init); | ||
721 | module_exit(nosy_cleanup); | ||