coresight-etm3x: use module_amba_driver to simplify the code
authorMathieu Poirier <mathieu.poirier@linaro.org>
Tue, 19 May 2015 16:55:06 +0000 (10:55 -0600)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 24 May 2015 18:12:07 +0000 (11:12 -0700)
Using function "module_amba_driver()" makes the code simpler by
eliminating boilerplate code.

Wei Yongjun sent out a set of patches addressing those in all the
coresight driver but missed ETMv3.

Signed-off-by: Mathieu Poirier <mathieu.poirier@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/hwtracing/coresight/coresight-etm3x.c

index c965f5724abdb3cfc5d4693c94b26820a4800f05..d78fcc23c4e086f7773db2f2d1588bed0340b487 100644 (file)
@@ -1916,17 +1916,7 @@ static struct amba_driver etm_driver = {
        .id_table       = etm_ids,
 };
 
-int __init etm_init(void)
-{
-       return amba_driver_register(&etm_driver);
-}
-module_init(etm_init);
-
-void __exit etm_exit(void)
-{
-       amba_driver_unregister(&etm_driver);
-}
-module_exit(etm_exit);
+module_amba_driver(etm_driver);
 
 MODULE_LICENSE("GPL v2");
 MODULE_DESCRIPTION("CoreSight Program Flow Trace driver");
This page took 0.03052 seconds and 5 git commands to generate.