summaryrefslogtreecommitdiff
path: root/drivers/hid
diff options
context:
space:
mode:
authorWei Yongjun <weiyongjun1@huawei.com>2016-08-21 15:28:36 +0000
committerJiri Kosina <jkosina@suse.cz>2016-08-29 09:36:19 +0200
commit37becf6e603236a19660e76a3b82f9cc25972e2d (patch)
tree4d7d6b9108a7ad982badb0a50eb373aabdcecb7e /drivers/hid
parent67c0fe420ea716268b761de72ef0420b7b02bc96 (diff)
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 <weiyongjun1@huawei.com> Acked-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
Diffstat (limited to 'drivers/hid')
-rw-r--r--drivers/hid/intel-ish-hid/ipc/pci-ish.c13
1 files changed, 1 insertions, 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 <daniel.drubin@intel.com>");