summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWei Yongjun <yongjun_wei@trendmicro.com.cn>2015-01-10 02:57:15 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2015-01-12 16:04:13 +0300
commitd2e580c272d19afff768b56dd0f5d2095cb5a07c (patch)
tree2afa0cba578b0f9e2476c8402449dac915def1d2
parenta48f52e185f7f6da2c53f8dd4efda963c32b73f1 (diff)
downloadlinux-d2e580c272d19afff768b56dd0f5d2095cb5a07c.tar.xz
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 <yongjun_wei@trendmicro.com.cn> Signed-off-by: Mathieu Poirier <mathieu.poirier@linaro.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r--drivers/coresight/coresight-tmc.c12
1 files changed, 1 insertions, 11 deletions
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");