[PATCH v2 1/2] coresight: ctcu: add missing MODULE_DEVICE_TABLE()

From: Qianhui Xu

Date: Fri Nov 27 2026 - 08:31:16 EST


The CTCU driver matches "qcom,sa8775p-ctcu", which SM8750 also falls back
to, but it never exports its OF match table. Built as a module the driver
therefore carries no "of:" modalias, so udev cannot autoload it when the
CTCU device is registered and the device stays unbound until someone runs
modprobe by hand.

Seen on SM8750 with CONFIG_CORESIGHT_CTCU=m: "modinfo -F alias
coresight-ctcu" prints nothing, while a manual modprobe binds
10001000.ctcu immediately. Add the missing MODULE_DEVICE_TABLE(of,
ctcu_match) so the module is autoloaded like the other Coresight drivers.

*** AI-assistance disclosure ***
This patch was prepared with the help of an LLM coding assistant. The
author reviewed every line and ran the commands quoted above.

Fixes: f78d206f3d73 ("Coresight: Add Coresight TMC Control Unit driver")
Reviewed-by: James Clark <james.clark@xxxxxxxxxx>
Signed-off-by: Qianhui Xu <xiaqinghuan@xxxxxxxxxxxxxxxx>
---
drivers/hwtracing/coresight/coresight-ctcu-core.c | 1 +
1 file changed, 1 insertion(+)

diff --git a/drivers/hwtracing/coresight/coresight-ctcu-core.c b/drivers/hwtracing/coresight/coresight-ctcu-core.c
index 9043cad42f01e..a7caa5b00b6d1 100644
--- a/drivers/hwtracing/coresight/coresight-ctcu-core.c
+++ b/drivers/hwtracing/coresight/coresight-ctcu-core.c
@@ -295,6 +295,7 @@ static const struct of_device_id ctcu_match[] = {
{.compatible = "qcom,sa8775p-ctcu", .data = &sa8775p_cfgs},
{}
};
+MODULE_DEVICE_TABLE(of, ctcu_match);

static struct platform_driver ctcu_driver = {
.probe = ctcu_platform_probe,
--
2.53.0