]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
HID: intel-ish-hid: use module_pci_driver to simplify the code
authorWei Yongjun <weiyongjun1@huawei.com>
Sun, 21 Aug 2016 15:28:36 +0000 (15:28 +0000)
committerJiri Kosina <jkosina@suse.cz>
Mon, 29 Aug 2016 07:36:19 +0000 (09:36 +0200)
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>
drivers/hid/intel-ish-hid/ipc/pci-ish.c

index b14d6f4774b9b70f54984c6995725f6a84ca7341..42f0beeb09fd4e2ab4fe6ad246f9f21786bf3e3d 100644 (file)
@@ -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>");