forked from torvalds/linux
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
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 <[email protected]> Signed-off-by: Dmitry Torokhov <[email protected]>
- Loading branch information
Showing
3 changed files
with
5 additions
and
39 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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 <[email protected]>"); | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -206,6 +206,7 @@ static const struct pci_device_id pcips2_ids[] = { | |
}, | ||
{ 0, } | ||
}; | ||
MODULE_DEVICE_TABLE(pci, pcips2_ids); | ||
|
||
static struct pci_driver pcips2_driver = { | ||
.name = "pcips2", | ||
|
@@ -214,20 +215,8 @@ static struct pci_driver pcips2_driver = { | |
.remove = __devexit_p(pcips2_remove), | ||
}; | ||
|
||
static int __init pcips2_init(void) | ||
{ | ||
return pci_register_driver(&pcips2_driver); | ||
} | ||
|
||
static void __exit pcips2_exit(void) | ||
{ | ||
pci_unregister_driver(&pcips2_driver); | ||
} | ||
|
||
module_init(pcips2_init); | ||
module_exit(pcips2_exit); | ||
module_pci_driver(pcips2_driver); | ||
|
||
MODULE_LICENSE("GPL"); | ||
MODULE_AUTHOR("Russell King <[email protected]>"); | ||
MODULE_DESCRIPTION("PCI PS/2 keyboard/mouse driver"); | ||
MODULE_DEVICE_TABLE(pci, pcips2_ids); |