meta-dcm/recipes-kernel/linux/linux-stm32mp/0002-fix-stm32-rifsc-debugf...

36 lines
1.0 KiB
Diff

From: Michael Franz <michael.franz@di-pas.de>
Date: Thu, 16 May 2025 10:00:00 +0100
Subject: [PATCH] bus: stm32_rifsc: Fix debugfs function call
Wrap the stm32_rifsc_register_debugfs function call with CONFIG_DEBUG_FS
to prevent compilation errors when debugfs is disabled.
Signed-off-by: Michael Franz <michael.franz@di-pas.de>
---
drivers/bus/stm32_rifsc.c | 2 ++
1 file changed, 2 insertions(+), 0 deletions(-)
diff --git a/drivers/bus/stm32_rifsc.c b/drivers/bus/stm32_rifsc.c
index a4fd24ef76b4..26f7cd5b1e2b 100644
--- a/drivers/bus/stm32_rifsc.c
+++ b/drivers/bus/stm32_rifsc.c
@@ -655,15 +655,17 @@
rc = stm32_firewall_populate_bus(rifsc_controller);
if (rc) {
dev_err(rifsc_controller->dev, "Couldn't populate RIFSC bus: %d",
rc);
return rc;
}
+#ifdef CONFIG_DEBUG_FS
stm32_rifsc_register_debugfs(rifsc_controller);
+#endif
/* Populate all allowed nodes */
return of_platform_populate(np, NULL, NULL, &pdev->dev);
}
static const struct of_device_id stm32_rifsc_of_match[] = {
{ .compatible = "st,stm32mp25-rifsc" },