From: Wei Yongjun <yongjun_wei@trendmicro.com.cn> Date: Fri, 9 Jan 2015 23:57:16 +0000 (-0700) Subject: coresight-tpiu: use module_amba_driver to simplify the code X-Git-Tag: firefly_0821_release~3680^2~19^2~3^2^2~15 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=5d51a40f730179445e9a5bd7e38c4ded852be2eb;p=firefly-linux-kernel-4.4.55.git coresight-tpiu: 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> (cherry picked from commit 3ff7ca051a43bf2dfd1eebdd6c771c4b7a276d8e) Signed-off-by: Mathieu Poirier <mathieu.poirier@linaro.org> --- diff --git a/drivers/coresight/coresight-tpiu.c b/drivers/coresight/coresight-tpiu.c index ae101082791a..3b33af2416bb 100644 --- a/drivers/coresight/coresight-tpiu.c +++ b/drivers/coresight/coresight-tpiu.c @@ -201,17 +201,7 @@ static struct amba_driver tpiu_driver = { .id_table = tpiu_ids, }; -static int __init tpiu_init(void) -{ - return amba_driver_register(&tpiu_driver); -} -module_init(tpiu_init); - -static void __exit tpiu_exit(void) -{ - amba_driver_unregister(&tpiu_driver); -} -module_exit(tpiu_exit); +module_amba_driver(tpiu_driver); MODULE_LICENSE("GPL v2"); MODULE_DESCRIPTION("CoreSight Trace Port Interface Unit driver");