]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
coresight: pass THIS_MODULE implicitly through a macro
authorShashank Balaji <shashank.mahadasyam@sony.com>
Mon, 18 May 2026 10:19:59 +0000 (19:19 +0900)
committerDanilo Krummrich <dakr@kernel.org>
Mon, 8 Jun 2026 21:28:11 +0000 (23:28 +0200)
Rename coresight_init_driver() to coresight_init_driver_with_owner() and
replace it with a macro wrapper that passes THIS_MODULE implicitly. This
is in line with what other buses do.

Suggested-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Reviewed-by: Leo Yan <leo.yan@arm.com>
Co-developed-by: Rahul Bukte <rahul.bukte@sony.com>
Signed-off-by: Rahul Bukte <rahul.bukte@sony.com>
Signed-off-by: Shashank Balaji <shashank.mahadasyam@sony.com>
Link: https://patch.msgid.link/20260518-acpi_mod_name-v5-3-705ccc430885@sony.com
Signed-off-by: Danilo Krummrich <dakr@kernel.org>
drivers/hwtracing/coresight/coresight-catu.c
drivers/hwtracing/coresight/coresight-core.c
drivers/hwtracing/coresight/coresight-cpu-debug.c
drivers/hwtracing/coresight/coresight-funnel.c
drivers/hwtracing/coresight/coresight-replicator.c
drivers/hwtracing/coresight/coresight-stm.c
drivers/hwtracing/coresight/coresight-tmc-core.c
drivers/hwtracing/coresight/coresight-tnoc.c
drivers/hwtracing/coresight/coresight-tpdm.c
drivers/hwtracing/coresight/coresight-tpiu.c
include/linux/coresight.h

index ce71dcddfca2558eddd625de58a709b151f2e07e..0c8698c8fc5e707cb4e043dd0821a73b1293f09c 100644 (file)
@@ -706,7 +706,7 @@ static int __init catu_init(void)
 {
        int ret;
 
-       ret = coresight_init_driver("catu", &catu_driver, &catu_platform_driver, THIS_MODULE);
+       ret = coresight_init_driver("catu", &catu_driver, &catu_platform_driver);
        tmc_etr_set_catu_ops(&etr_catu_buf_ops);
        return ret;
 }
index 46f247f73cf64a97b9353b84ba5b76b991676f5f..54ad5193b850e22e38fc679fca30d6051408b87c 100644 (file)
@@ -1694,8 +1694,8 @@ static void __exit coresight_exit(void)
 module_init(coresight_init);
 module_exit(coresight_exit);
 
-int coresight_init_driver(const char *drv, struct amba_driver *amba_drv,
-                         struct platform_driver *pdev_drv, struct module *owner)
+int coresight_init_driver_with_owner(const char *drv, struct amba_driver *amba_drv,
+                                    struct platform_driver *pdev_drv, struct module *owner)
 {
        int ret;
 
@@ -1713,7 +1713,7 @@ int coresight_init_driver(const char *drv, struct amba_driver *amba_drv,
        amba_driver_unregister(amba_drv);
        return ret;
 }
-EXPORT_SYMBOL_GPL(coresight_init_driver);
+EXPORT_SYMBOL_GPL(coresight_init_driver_with_owner);
 
 void coresight_remove_driver(struct amba_driver *amba_drv,
                             struct platform_driver *pdev_drv)
index 629614278e46ef8a4c9c6aaf0dc933d6029fa384..3a806c1d50eafb4249ab516ef846e437831b9681 100644 (file)
@@ -757,8 +757,7 @@ static struct platform_driver debug_platform_driver = {
 
 static int __init debug_init(void)
 {
-       return coresight_init_driver("debug", &debug_driver, &debug_platform_driver,
-                                    THIS_MODULE);
+       return coresight_init_driver("debug", &debug_driver, &debug_platform_driver);
 }
 
 static void __exit debug_exit(void)
index 3f56ceccd8c9f6deaaf783a06a0d19fb06eff7c4..0abc11f0690c5272ebd55df9e98544e3b401cfe6 100644 (file)
@@ -412,8 +412,7 @@ static struct amba_driver dynamic_funnel_driver = {
 
 static int __init funnel_init(void)
 {
-       return coresight_init_driver("funnel", &dynamic_funnel_driver, &funnel_driver,
-                                    THIS_MODULE);
+       return coresight_init_driver("funnel", &dynamic_funnel_driver, &funnel_driver);
 }
 
 static void __exit funnel_exit(void)
index 07fc04f53b88fdec7ae18d3000046fe74c0cec9d..2f382de357ee4793af5abe1df1a3c9dbb55057f2 100644 (file)
@@ -418,8 +418,7 @@ static struct amba_driver dynamic_replicator_driver = {
 
 static int __init replicator_init(void)
 {
-       return coresight_init_driver("replicator", &dynamic_replicator_driver, &replicator_driver,
-                                    THIS_MODULE);
+       return coresight_init_driver("replicator", &dynamic_replicator_driver, &replicator_driver);
 }
 
 static void __exit replicator_exit(void)
index aca6cec7885a551ad5960986b1cdf08baa6b5a94..4e860519a73f6fff640090cf58298b89a31e6359 100644 (file)
@@ -1050,7 +1050,7 @@ static struct platform_driver stm_platform_driver = {
 
 static int __init stm_init(void)
 {
-       return coresight_init_driver("stm", &stm_driver, &stm_platform_driver, THIS_MODULE);
+       return coresight_init_driver("stm", &stm_driver, &stm_platform_driver);
 }
 
 static void __exit stm_exit(void)
index c89fe996af23194c7e59432ce39ce20bb65937cf..bc5a133ada3e35c1a6f6835ffc10842073b7a735 100644 (file)
@@ -1046,7 +1046,7 @@ static struct platform_driver tmc_platform_driver = {
 
 static int __init tmc_init(void)
 {
-       return coresight_init_driver("tmc", &tmc_driver, &tmc_platform_driver, THIS_MODULE);
+       return coresight_init_driver("tmc", &tmc_driver, &tmc_platform_driver);
 }
 
 static void __exit tmc_exit(void)
index 96a25877b8240f20921efa979a361eb473c05600..9e8de4323d28593620f98a2b8f1be0489e94587a 100644 (file)
@@ -344,7 +344,7 @@ static struct platform_driver itnoc_driver = {
 
 static int __init tnoc_init(void)
 {
-       return coresight_init_driver("tnoc", &trace_noc_driver, &itnoc_driver, THIS_MODULE);
+       return coresight_init_driver("tnoc", &trace_noc_driver, &itnoc_driver);
 }
 
 static void __exit tnoc_exit(void)
index eaf7210af64838c9b006e02a74fa71a2243b8bab..8464edbba2d45efa5ba041dae70149a946c20465 100644 (file)
@@ -1563,8 +1563,7 @@ static struct platform_driver static_tpdm_driver = {
 
 static int __init tpdm_init(void)
 {
-       return coresight_init_driver("tpdm", &dynamic_tpdm_driver, &static_tpdm_driver,
-                                    THIS_MODULE);
+       return coresight_init_driver("tpdm", &dynamic_tpdm_driver, &static_tpdm_driver);
 }
 
 static void __exit tpdm_exit(void)
index b8560b140e0fa4bf8bf1e5c60fe67077b11798fd..7b029d2eb3891fd1f18e3db0368b0fbca0042f8f 100644 (file)
@@ -310,7 +310,7 @@ static struct platform_driver tpiu_platform_driver = {
 
 static int __init tpiu_init(void)
 {
-       return coresight_init_driver("tpiu", &tpiu_driver, &tpiu_platform_driver, THIS_MODULE);
+       return coresight_init_driver("tpiu", &tpiu_driver, &tpiu_platform_driver);
 }
 
 static void __exit tpiu_exit(void)
index 2131febebee93d609df1aea8534a10898b600be2..cd8fb47a1192f75b54b4d8580a66fb03e010004c 100644 (file)
@@ -691,8 +691,10 @@ coresight_find_output_type(struct coresight_platform_data *pdata,
                           enum coresight_dev_type type,
                           union coresight_dev_subtype subtype);
 
-int coresight_init_driver(const char *drv, struct amba_driver *amba_drv,
-                         struct platform_driver *pdev_drv, struct module *owner);
+int coresight_init_driver_with_owner(const char *drv, struct amba_driver *amba_drv,
+                                    struct platform_driver *pdev_drv, struct module *owner);
+#define coresight_init_driver(drv, amba_drv, pdev_drv) \
+       coresight_init_driver_with_owner(drv, amba_drv, pdev_drv, THIS_MODULE)
 
 void coresight_remove_driver(struct amba_driver *amba_drv,
                             struct platform_driver *pdev_drv);