summaryrefslogtreecommitdiffstats
path: root/drivers/misc
diff options
context:
space:
mode:
authorTomas Winkler <tomas.winkler@intel.com>2012-07-19 09:45:32 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2012-07-19 15:33:30 -0700
commit6078188e2ba1d61a2119ddb2289e88c2c2a015ab (patch)
tree921f3950ba04353729735af6d11e15ac20051e6a /drivers/misc
parent5b1f6d81e4c63ae30d92678cc35081001add7674 (diff)
mei: use module_pci_driver
use module_pci_driver() macro to wrap standard pci module registration into a single line Signed-off-by: Tomas Winkler <tomas.winkler@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/misc')
-rw-r--r--drivers/misc/mei/main.c39
1 files changed, 1 insertions, 38 deletions
diff --git a/drivers/misc/mei/main.c b/drivers/misc/mei/main.c
index 0d98c2ee6fe..09233020886 100644
--- a/drivers/misc/mei/main.c
+++ b/drivers/misc/mei/main.c
@@ -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");