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>pull/806/head
parent
df333d058a
commit
2ccf8c76b4
|
|
@ -162,23 +162,7 @@ static struct platform_driver tis_synquacer_drv = {
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
static int __init tpm_tis_synquacer_module_init(void)
|
module_platform_driver(tis_synquacer_drv);
|
||||||
{
|
|
||||||
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_init(tpm_tis_synquacer_module_init);
|
|
||||||
module_exit(tpm_tis_synquacer_module_exit);
|
|
||||||
MODULE_DESCRIPTION("TPM MMIO Driver for Socionext SynQuacer platform");
|
MODULE_DESCRIPTION("TPM MMIO Driver for Socionext SynQuacer platform");
|
||||||
MODULE_LICENSE("GPL");
|
MODULE_LICENSE("GPL");
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue