Skip to content

Commit

Permalink
HID: intel-ish-hid: use module_pci_driver to simplify the code
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Wei Yongjun authored and Jiri Kosina committed Aug 29, 2016
1 parent 67c0fe4 commit 37becf6
Showing 1 changed file with 1 addition and 12 deletions.
13 changes: 1 addition & 12 deletions drivers/hid/intel-ish-hid/ipc/pci-ish.c
Original file line number Diff line number Diff line change
Expand Up @@ -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>");
Expand Down

0 comments on commit 37becf6

Please sign in to comment.