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/serio | |
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/serio')
-rw-r--r-- | drivers/input/serio/pcips2.c | 15 |
1 files changed, 2 insertions, 13 deletions
diff --git a/drivers/input/serio/pcips2.c b/drivers/input/serio/pcips2.c index 43494742541c..0c42497aaaf4 100644 --- a/drivers/input/serio/pcips2.c +++ b/drivers/input/serio/pcips2.c | |||
@@ -206,6 +206,7 @@ static const struct pci_device_id pcips2_ids[] = { | |||
206 | }, | 206 | }, |
207 | { 0, } | 207 | { 0, } |
208 | }; | 208 | }; |
209 | MODULE_DEVICE_TABLE(pci, pcips2_ids); | ||
209 | 210 | ||
210 | static struct pci_driver pcips2_driver = { | 211 | static struct pci_driver pcips2_driver = { |
211 | .name = "pcips2", | 212 | .name = "pcips2", |
@@ -214,20 +215,8 @@ static struct pci_driver pcips2_driver = { | |||
214 | .remove = __devexit_p(pcips2_remove), | 215 | .remove = __devexit_p(pcips2_remove), |
215 | }; | 216 | }; |
216 | 217 | ||
217 | static int __init pcips2_init(void) | 218 | module_pci_driver(pcips2_driver); |
218 | { | ||
219 | return pci_register_driver(&pcips2_driver); | ||
220 | } | ||
221 | |||
222 | static void __exit pcips2_exit(void) | ||
223 | { | ||
224 | pci_unregister_driver(&pcips2_driver); | ||
225 | } | ||
226 | |||
227 | module_init(pcips2_init); | ||
228 | module_exit(pcips2_exit); | ||
229 | 219 | ||
230 | MODULE_LICENSE("GPL"); | 220 | MODULE_LICENSE("GPL"); |
231 | MODULE_AUTHOR("Russell King <rmk@arm.linux.org.uk>"); | 221 | MODULE_AUTHOR("Russell King <rmk@arm.linux.org.uk>"); |
232 | MODULE_DESCRIPTION("PCI PS/2 keyboard/mouse driver"); | 222 | MODULE_DESCRIPTION("PCI PS/2 keyboard/mouse driver"); |
233 | MODULE_DEVICE_TABLE(pci, pcips2_ids); | ||