Skip to content

Commit

Permalink
PNP: tpm/tpm_infineon: Use module_pnp_driver to register driver
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Peter Huewe authored and Rafael J. Wysocki committed Mar 18, 2015
1 parent 95c0fd4 commit 1551660
Showing 1 changed file with 1 addition and 12 deletions.
13 changes: 1 addition & 12 deletions drivers/char/tpm/tpm_infineon.c
Original file line number Diff line number Diff line change
Expand Up @@ -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");
Expand Down

0 comments on commit 1551660

Please sign in to comment.