diff options
author | Axel Lin <axel.lin@gmail.com> | 2012-04-22 02:37:53 -0400 |
---|---|---|
committer | Dmitry Torokhov <dmitry.torokhov@gmail.com> | 2012-04-22 02:48:58 -0400 |
commit | 5d066474cd64a5877391e3711e8c7973e6478cc8 (patch) | |
tree | 21d1ee939246dd3999f0459c345acc76cb3435ff /drivers/input/gameport | |
parent | 57b8628bb0ac4e47c806e45c5bbd89282e93869b (diff) |
Input: use module_pci_driver
This patch converts the drivers in drivers/input/* 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: Dmitry Torokhov <dtor@mail.ru>
Diffstat (limited to 'drivers/input/gameport')
-rw-r--r-- | drivers/input/gameport/emu10k1-gp.c | 13 | ||||
-rw-r--r-- | drivers/input/gameport/fm801-gp.c | 16 |
2 files changed, 3 insertions, 26 deletions
diff --git a/drivers/input/gameport/emu10k1-gp.c b/drivers/input/gameport/emu10k1-gp.c index 422aa0a6b77f..daceafe7ee7d 100644 --- a/drivers/input/gameport/emu10k1-gp.c +++ b/drivers/input/gameport/emu10k1-gp.c | |||
@@ -125,15 +125,4 @@ static struct pci_driver emu_driver = { | |||
125 | .remove = __devexit_p(emu_remove), | 125 | .remove = __devexit_p(emu_remove), |
126 | }; | 126 | }; |
127 | 127 | ||
128 | static int __init emu_init(void) | 128 | module_pci_driver(emu_driver); |
129 | { | ||
130 | return pci_register_driver(&emu_driver); | ||
131 | } | ||
132 | |||
133 | static void __exit emu_exit(void) | ||
134 | { | ||
135 | pci_unregister_driver(&emu_driver); | ||
136 | } | ||
137 | |||
138 | module_init(emu_init); | ||
139 | module_exit(emu_exit); | ||
diff --git a/drivers/input/gameport/fm801-gp.c b/drivers/input/gameport/fm801-gp.c index a3b70ff21018..48ad3829ff20 100644 --- a/drivers/input/gameport/fm801-gp.c +++ b/drivers/input/gameport/fm801-gp.c | |||
@@ -144,6 +144,7 @@ static const struct pci_device_id fm801_gp_id_table[] = { | |||
144 | { PCI_VENDOR_ID_FORTEMEDIA, PCI_DEVICE_ID_FM801_GP, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0 }, | 144 | { PCI_VENDOR_ID_FORTEMEDIA, PCI_DEVICE_ID_FM801_GP, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0 }, |
145 | { 0 } | 145 | { 0 } |
146 | }; | 146 | }; |
147 | MODULE_DEVICE_TABLE(pci, fm801_gp_id_table); | ||
147 | 148 | ||
148 | static struct pci_driver fm801_gp_driver = { | 149 | static struct pci_driver fm801_gp_driver = { |
149 | .name = "FM801_gameport", | 150 | .name = "FM801_gameport", |
@@ -152,20 +153,7 @@ static struct pci_driver fm801_gp_driver = { | |||
152 | .remove = __devexit_p(fm801_gp_remove), | 153 | .remove = __devexit_p(fm801_gp_remove), |
153 | }; | 154 | }; |
154 | 155 | ||
155 | static int __init fm801_gp_init(void) | 156 | module_pci_driver(fm801_gp_driver); |
156 | { | ||
157 | return pci_register_driver(&fm801_gp_driver); | ||
158 | } | ||
159 | |||
160 | static void __exit fm801_gp_exit(void) | ||
161 | { | ||
162 | pci_unregister_driver(&fm801_gp_driver); | ||
163 | } | ||
164 | |||
165 | module_init(fm801_gp_init); | ||
166 | module_exit(fm801_gp_exit); | ||
167 | |||
168 | MODULE_DEVICE_TABLE(pci, fm801_gp_id_table); | ||
169 | 157 | ||
170 | MODULE_DESCRIPTION("FM801 gameport driver"); | 158 | MODULE_DESCRIPTION("FM801 gameport driver"); |
171 | MODULE_AUTHOR("Takashi Iwai <tiwai@suse.de>"); | 159 | MODULE_AUTHOR("Takashi Iwai <tiwai@suse.de>"); |