From 5d066474cd64a5877391e3711e8c7973e6478cc8 Mon Sep 17 00:00:00 2001 From: Axel Lin Date: Sat, 21 Apr 2012 23:37:53 -0700 Subject: 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 Signed-off-by: Dmitry Torokhov --- drivers/input/serio/pcips2.c | 15 ++------------- 1 file changed, 2 insertions(+), 13 deletions(-) (limited to 'drivers/input/serio') 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[] = { }, { 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 "); MODULE_DESCRIPTION("PCI PS/2 keyboard/mouse driver"); -MODULE_DEVICE_TABLE(pci, pcips2_ids); -- cgit v1.2.2