diff options
author | Peter Huewe <PeterHuewe@gmx.de> | 2015-03-16 23:46:31 +0300 |
---|---|---|
committer | Rafael J. Wysocki <rafael.j.wysocki@intel.com> | 2015-03-19 00:39:17 +0300 |
commit | 1551660369d00a7e8cdfa12e9af132053eb67140 (patch) | |
tree | 2d92c85352ff6c770d1171818fd9d2d95634c968 /drivers/char | |
parent | 95c0fd457b03099b5ce385f3982e06d01ad42c5c (diff) | |
download | linux-1551660369d00a7e8cdfa12e9af132053eb67140.tar.xz |
PNP: tpm/tpm_infineon: Use module_pnp_driver to register driver
Removing some boilerplate by using module_pnp_driver instead of calling
register and unregister in the otherwise empty init/exit functions
Signed-off-by: Peter Huewe <peterhuewe@gmx.de>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Diffstat (limited to 'drivers/char')
-rw-r--r-- | drivers/char/tpm/tpm_infineon.c | 13 |
1 files changed, 1 insertions, 12 deletions
diff --git a/drivers/char/tpm/tpm_infineon.c b/drivers/char/tpm/tpm_infineon.c index 6d492132ad2b..29ba520ac24d 100644 --- a/drivers/char/tpm/tpm_infineon.c +++ b/drivers/char/tpm/tpm_infineon.c @@ -637,18 +637,7 @@ static struct pnp_driver tpm_inf_pnp_driver = { .remove = tpm_inf_pnp_remove }; -static int __init init_inf(void) -{ - return pnp_register_driver(&tpm_inf_pnp_driver); -} - -static void __exit cleanup_inf(void) -{ - pnp_unregister_driver(&tpm_inf_pnp_driver); -} - -module_init(init_inf); -module_exit(cleanup_inf); +module_pnp_driver(tpm_inf_pnp_driver); MODULE_AUTHOR("Marcel Selhorst <tpmdd@sirrix.com>"); MODULE_DESCRIPTION("Driver for Infineon TPM SLD 9630 TT 1.1 / SLB 9635 TT 1.2"); |