提交 6078188e 编写于 作者: T Tomas Winkler 提交者: Greg Kroah-Hartman

mei: use module_pci_driver

use module_pci_driver() macro to wrap standard
pci module registration into a single line
Signed-off-by: NTomas Winkler <tomas.winkler@intel.com>
Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
上级 5b1f6d81
......@@ -1182,44 +1182,7 @@ static struct pci_driver mei_driver = {
.driver.pm = MEI_PM_OPS,
};
/**
* mei_init_module - Driver Registration Routine
*
* mei_init_module is the first routine called when the driver is
* loaded. All it does is to register with the PCI subsystem.
*
* returns 0 on success, <0 on failure.
*/
static int __init mei_init_module(void)
{
int ret;
pr_debug("loading.\n");
/* init pci module */
ret = pci_register_driver(&mei_driver);
if (ret < 0)
pr_err("error registering driver.\n");
return ret;
}
module_init(mei_init_module);
/**
* mei_exit_module - Driver Exit Cleanup Routine
*
* mei_exit_module is called just before the driver is removed
* from memory.
*/
static void __exit mei_exit_module(void)
{
pci_unregister_driver(&mei_driver);
pr_debug("unloaded successfully.\n");
}
module_exit(mei_exit_module);
module_pci_driver(mei_driver);
MODULE_AUTHOR("Intel Corporation");
MODULE_DESCRIPTION("Intel(R) Management Engine Interface");
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册