summaryrefslogtreecommitdiffstats
path: root/drivers/input/gameport/fm801-gp.c
diff options
context:
space:
mode:
authorAxel Lin <axel.lin@gmail.com>2012-04-21 23:37:53 -0700
committerDmitry Torokhov <dmitry.torokhov@gmail.com>2012-04-21 23:48:58 -0700
commit5d066474cd64a5877391e3711e8c7973e6478cc8 (patch)
tree21d1ee939246dd3999f0459c345acc76cb3435ff /drivers/input/gameport/fm801-gp.c
parent57b8628bb0ac4e47c806e45c5bbd89282e93869b (diff)
downloadop-kernel-dev-5d066474cd64a5877391e3711e8c7973e6478cc8.zip
op-kernel-dev-5d066474cd64a5877391e3711e8c7973e6478cc8.tar.gz
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/fm801-gp.c')
-rw-r--r--drivers/input/gameport/fm801-gp.c16
1 files changed, 2 insertions, 14 deletions
diff --git a/drivers/input/gameport/fm801-gp.c b/drivers/input/gameport/fm801-gp.c
index a3b70ff..48ad382 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[] = {
{ PCI_VENDOR_ID_FORTEMEDIA, PCI_DEVICE_ID_FM801_GP, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0 },
{ 0 }
};
+MODULE_DEVICE_TABLE(pci, fm801_gp_id_table);
static struct pci_driver fm801_gp_driver = {
.name = "FM801_gameport",
@@ -152,20 +153,7 @@ static struct pci_driver fm801_gp_driver = {
.remove = __devexit_p(fm801_gp_remove),
};
-static int __init fm801_gp_init(void)
-{
- return pci_register_driver(&fm801_gp_driver);
-}
-
-static void __exit fm801_gp_exit(void)
-{
- pci_unregister_driver(&fm801_gp_driver);
-}
-
-module_init(fm801_gp_init);
-module_exit(fm801_gp_exit);
-
-MODULE_DEVICE_TABLE(pci, fm801_gp_id_table);
+module_pci_driver(fm801_gp_driver);
MODULE_DESCRIPTION("FM801 gameport driver");
MODULE_AUTHOR("Takashi Iwai <tiwai@suse.de>");
OpenPOWER on IntegriCloud