From 37becf6e603236a19660e76a3b82f9cc25972e2d Mon Sep 17 00:00:00 2001 From: Wei Yongjun Date: Sun, 21 Aug 2016 15:28:36 +0000 Subject: [PATCH] HID: intel-ish-hid: use module_pci_driver to simplify the code Use the module_pci_driver() macro to make the code simpler by eliminating module_init and module_exit calls. Signed-off-by: Wei Yongjun Acked-by: Srinivas Pandruvada Signed-off-by: Jiri Kosina --- drivers/hid/intel-ish-hid/ipc/pci-ish.c | 13 +------------ 1 file changed, 1 insertion(+), 12 deletions(-) diff --git a/drivers/hid/intel-ish-hid/ipc/pci-ish.c b/drivers/hid/intel-ish-hid/ipc/pci-ish.c index b14d6f4774b9..42f0beeb09fd 100644 --- a/drivers/hid/intel-ish-hid/ipc/pci-ish.c +++ b/drivers/hid/intel-ish-hid/ipc/pci-ish.c @@ -311,18 +311,7 @@ static struct pci_driver ish_driver = { .driver.pm = ISHTP_ISH_PM_OPS, }; -static int __init ish_driver_init(void) -{ - return pci_register_driver(&ish_driver); -} - -static void __exit ish_driver_exit(void) -{ - pci_unregister_driver(&ish_driver); -} - -module_init(ish_driver_init); -module_exit(ish_driver_exit); +module_pci_driver(ish_driver); /* Original author */ MODULE_AUTHOR("Daniel Drubin "); -- 2.20.1