summaryrefslogtreecommitdiff
path: root/drivers/char
diff options
context:
space:
mode:
authorLi Zetao <lizetao1@huawei.com>2023-08-15 16:06:37 +0800
committerJarkko Sakkinen <jarkko@kernel.org>2023-08-17 20:12:41 +0000
commit2ccf8c76b4fb38deb25af3830aa9489b6a374621 (patch)
treed65fe624993cddb57e7f5a6738084347bf6ece12 /drivers/char
parentdf333d058a60a8dc282009a483124983669b4203 (diff)
tpm/tpm_tis_synquacer: Use module_platform_driver macro to simplify the 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 <lizetao1@huawei.com> Reviewed-by: Jarkko Sakkinen <jarkko@kernel.org> Signed-off-by: Jarkko Sakkinen <jarkko@kernel.org>
Diffstat (limited to 'drivers/char')
-rw-r--r--drivers/char/tpm/tpm_tis_synquacer.c18
1 files changed, 1 insertions, 17 deletions
diff --git a/drivers/char/tpm/tpm_tis_synquacer.c b/drivers/char/tpm/tpm_tis_synquacer.c
index 49278746b0e2..f7d5e76b505e 100644
--- a/drivers/char/tpm/tpm_tis_synquacer.c
+++ b/drivers/char/tpm/tpm_tis_synquacer.c
@@ -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");