Skip to content

Commit 37becf6

Browse files
Wei YongjunJiri Kosina
authored andcommitted
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 <[email protected]> Acked-by: Srinivas Pandruvada <[email protected]> Signed-off-by: Jiri Kosina <[email protected]>
1 parent 67c0fe4 commit 37becf6

File tree

1 file changed

+1
-12
lines changed

1 file changed

+1
-12
lines changed

drivers/hid/intel-ish-hid/ipc/pci-ish.c

Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -311,18 +311,7 @@ static struct pci_driver ish_driver = {
311311
.driver.pm = ISHTP_ISH_PM_OPS,
312312
};
313313

314-
static int __init ish_driver_init(void)
315-
{
316-
return pci_register_driver(&ish_driver);
317-
}
318-
319-
static void __exit ish_driver_exit(void)
320-
{
321-
pci_unregister_driver(&ish_driver);
322-
}
323-
324-
module_init(ish_driver_init);
325-
module_exit(ish_driver_exit);
314+
module_pci_driver(ish_driver);
326315

327316
/* Original author */
328317
MODULE_AUTHOR("Daniel Drubin <[email protected]>");

0 commit comments

Comments
 (0)