summaryrefslogtreecommitdiff
path: root/drivers/hwtracing
diff options
context:
space:
mode:
authorYang Yingliang <yangyingliang@huawei.com>2023-08-04 12:27:09 +0300
committerSuzuki K Poulose <suzuki.poulose@arm.com>2023-08-04 16:17:30 +0300
commit28a03fae6e524d39fec14fea1ee67b86f4870658 (patch)
tree0e21a5c6b3c956ea9445e137cb3b2686c01c7d5e /drivers/hwtracing
parentfd380097cdb305582b7a1f9476391330299d2c59 (diff)
downloadlinux-28a03fae6e524d39fec14fea1ee67b86f4870658.tar.xz
coresight: dummy: simplify the code with module_platform_driver
The init/exit() of driver only calls platform_driver_register/unregister, it can be simpilfied with module_platform_driver. Signed-off-by: Yang Yingliang <yangyingliang@huawei.com> Signed-off-by: Suzuki K Poulose <suzuki.poulose@arm.com> Link: https://lore.kernel.org/r/20230804092709.1359264-1-yangyingliang@huawei.com
Diffstat (limited to 'drivers/hwtracing')
-rw-r--r--drivers/hwtracing/coresight/coresight-dummy.c12
1 files changed, 1 insertions, 11 deletions
diff --git a/drivers/hwtracing/coresight/coresight-dummy.c b/drivers/hwtracing/coresight/coresight-dummy.c
index 8035120b70b3..e4deafae7bc2 100644
--- a/drivers/hwtracing/coresight/coresight-dummy.c
+++ b/drivers/hwtracing/coresight/coresight-dummy.c
@@ -147,17 +147,7 @@ static struct platform_driver dummy_driver = {
},
};
-static int __init dummy_init(void)
-{
- return platform_driver_register(&dummy_driver);
-}
-module_init(dummy_init);
-
-static void __exit dummy_exit(void)
-{
- platform_driver_unregister(&dummy_driver);
-}
-module_exit(dummy_exit);
+module_platform_driver(dummy_driver);
MODULE_LICENSE("GPL");
MODULE_DESCRIPTION("CoreSight dummy driver");