[PATCH 1/3] clk: zynqmp: Mark zynqmp_clk_ops as const

Michal Simek michal.simek at amd.com
Fri Jul 25 14:01:20 CEST 2025


Operations are not changing that's why mark them as const which ensure that
structure will be moved from .data section to .rodata section.

Signed-off-by: Michal Simek <michal.simek at amd.com>
---

 drivers/clk/clk_zynqmp.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/clk/clk_zynqmp.c b/drivers/clk/clk_zynqmp.c
index 4f67c958d0fc..7a433a667a49 100644
--- a/drivers/clk/clk_zynqmp.c
+++ b/drivers/clk/clk_zynqmp.c
@@ -882,7 +882,7 @@ static int zynqmp_clk_enable(struct clk *clk)
 	return ret;
 }
 
-static struct clk_ops zynqmp_clk_ops = {
+static const struct clk_ops zynqmp_clk_ops = {
 	.set_rate = zynqmp_clk_set_rate,
 	.get_rate = zynqmp_clk_get_rate,
 	.enable = zynqmp_clk_enable,
-- 
2.43.0

base-commit: 7178360d325a7ea5356b993a7f4156e4e1e80719


More information about the U-Boot mailing list