Skip to content

Commit

Permalink
tpm/tpm_tis_synquacer: Use module_platform_driver macro to simplify t…
Browse files Browse the repository at this point in the history
…he code

Use the module_platform_driver macro to simplify the code, which is the
same as declaring with module_init() and module_exit().

Signed-off-by: Li Zetao <[email protected]>
Reviewed-by: Jarkko Sakkinen <[email protected]>
Signed-off-by: Jarkko Sakkinen <[email protected]>
  • Loading branch information
Li Zetao authored and jarkkojs committed Aug 17, 2023
1 parent df333d0 commit 2ccf8c7
Showing 1 changed file with 1 addition and 17 deletions.
18 changes: 1 addition & 17 deletions drivers/char/tpm/tpm_tis_synquacer.c
Original file line number Diff line number Diff line change
Expand Up @@ -162,23 +162,7 @@ static struct platform_driver tis_synquacer_drv = {
},
};

static int __init tpm_tis_synquacer_module_init(void)
{
int rc;

rc = platform_driver_register(&tis_synquacer_drv);
if (rc)
return rc;

return 0;
}

static void __exit tpm_tis_synquacer_module_exit(void)
{
platform_driver_unregister(&tis_synquacer_drv);
}
module_platform_driver(tis_synquacer_drv);

module_init(tpm_tis_synquacer_module_init);
module_exit(tpm_tis_synquacer_module_exit);
MODULE_DESCRIPTION("TPM MMIO Driver for Socionext SynQuacer platform");
MODULE_LICENSE("GPL");

0 comments on commit 2ccf8c7

Please sign in to comment.