diff options
author | Tomas Winkler <tomas.winkler@intel.com> | 2012-07-19 02:45:32 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2012-07-19 18:33:30 -0400 |
commit | 6078188e2ba1d61a2119ddb2289e88c2c2a015ab (patch) | |
tree | 921f3950ba04353729735af6d11e15ac20051e6a /drivers/misc/mei/main.c | |
parent | 5b1f6d81e4c63ae30d92678cc35081001add7674 (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/mei/main.c')
-rw-r--r-- | drivers/misc/mei/main.c | 39 |
1 files changed, 1 insertions, 38 deletions
diff --git a/drivers/misc/mei/main.c b/drivers/misc/mei/main.c index 0d98c2ee6fe3..092330208869 100644 --- a/drivers/misc/mei/main.c +++ b/drivers/misc/mei/main.c | |||
@@ -1182,44 +1182,7 @@ static struct pci_driver mei_driver = { | |||
1182 | .driver.pm = MEI_PM_OPS, | 1182 | .driver.pm = MEI_PM_OPS, |
1183 | }; | 1183 | }; |
1184 | 1184 | ||
1185 | /** | 1185 | module_pci_driver(mei_driver); |
1186 | * mei_init_module - Driver Registration Routine | ||
1187 | * | ||
1188 | * mei_init_module is the first routine called when the driver is | ||
1189 | * loaded. All it does is to register with the PCI subsystem. | ||
1190 | * | ||
1191 | * returns 0 on success, <0 on failure. | ||
1192 | */ | ||
1193 | static int __init mei_init_module(void) | ||
1194 | { | ||
1195 | int ret; | ||
1196 | |||
1197 | pr_debug("loading.\n"); | ||
1198 | /* init pci module */ | ||
1199 | ret = pci_register_driver(&mei_driver); | ||
1200 | if (ret < 0) | ||
1201 | pr_err("error registering driver.\n"); | ||
1202 | |||
1203 | return ret; | ||
1204 | } | ||
1205 | |||
1206 | module_init(mei_init_module); | ||
1207 | |||
1208 | /** | ||
1209 | * mei_exit_module - Driver Exit Cleanup Routine | ||
1210 | * | ||
1211 | * mei_exit_module is called just before the driver is removed | ||
1212 | * from memory. | ||
1213 | */ | ||
1214 | static void __exit mei_exit_module(void) | ||
1215 | { | ||
1216 | pci_unregister_driver(&mei_driver); | ||
1217 | |||
1218 | pr_debug("unloaded successfully.\n"); | ||
1219 | } | ||
1220 | |||
1221 | module_exit(mei_exit_module); | ||
1222 | |||
1223 | 1186 | ||
1224 | MODULE_AUTHOR("Intel Corporation"); | 1187 | MODULE_AUTHOR("Intel Corporation"); |
1225 | MODULE_DESCRIPTION("Intel(R) Management Engine Interface"); | 1188 | MODULE_DESCRIPTION("Intel(R) Management Engine Interface"); |