From: Wei Yongjun Date: Fri, 9 Jan 2015 23:57:15 +0000 (-0700) Subject: coresight-tmc: use module_amba_driver to simplify the code X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=d2e580c272d19afff768b56dd0f5d2095cb5a07c;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git coresight-tmc: use module_amba_driver to simplify the code module_amba_driver() makes the code simpler by eliminating boilerplate code. Signed-off-by: Wei Yongjun Signed-off-by: Mathieu Poirier Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/coresight/coresight-tmc.c b/drivers/coresight/coresight-tmc.c index ce2c293f1707..3ff232f9ddf7 100644 --- a/drivers/coresight/coresight-tmc.c +++ b/drivers/coresight/coresight-tmc.c @@ -760,17 +760,7 @@ static struct amba_driver tmc_driver = { .id_table = tmc_ids, }; -static int __init tmc_init(void) -{ - return amba_driver_register(&tmc_driver); -} -module_init(tmc_init); - -static void __exit tmc_exit(void) -{ - amba_driver_unregister(&tmc_driver); -} -module_exit(tmc_exit); +module_amba_driver(tmc_driver); MODULE_LICENSE("GPL v2"); MODULE_DESCRIPTION("CoreSight Trace Memory Controller driver");