Skip to content

Commit 2ccf8c7

Browse files
Li Zetaojarkkojs
authored andcommitted
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 <[email protected]> Reviewed-by: Jarkko Sakkinen <[email protected]> Signed-off-by: Jarkko Sakkinen <[email protected]>
1 parent df333d0 commit 2ccf8c7

File tree

1 file changed

+1
-17
lines changed

1 file changed

+1
-17
lines changed

drivers/char/tpm/tpm_tis_synquacer.c

Lines changed: 1 addition & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -162,23 +162,7 @@ static struct platform_driver tis_synquacer_drv = {
162162
},
163163
};
164164

165-
static int __init tpm_tis_synquacer_module_init(void)
166-
{
167-
int rc;
168-
169-
rc = platform_driver_register(&tis_synquacer_drv);
170-
if (rc)
171-
return rc;
172-
173-
return 0;
174-
}
175-
176-
static void __exit tpm_tis_synquacer_module_exit(void)
177-
{
178-
platform_driver_unregister(&tis_synquacer_drv);
179-
}
165+
module_platform_driver(tis_synquacer_drv);
180166

181-
module_init(tpm_tis_synquacer_module_init);
182-
module_exit(tpm_tis_synquacer_module_exit);
183167
MODULE_DESCRIPTION("TPM MMIO Driver for Socionext SynQuacer platform");
184168
MODULE_LICENSE("GPL");

0 commit comments

Comments
 (0)