[PATCH 2/2] block: rockchip: Staticize and constify driver ops
Marek Vasut
marek.vasut+renesas at mailbox.org
Thu May 7 18:42:40 CEST 2026
Set the ops structure as static const. The structure is not accessible
from outside of this driver and is not going to be modified at runtime.
Signed-off-by: Marek Vasut <marek.vasut+renesas at mailbox.org>
---
Cc: Tom Rini <trini at konsulko.com>
Cc: u-boot at lists.denx.de
---
drivers/block/rkmtd.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/block/rkmtd.c b/drivers/block/rkmtd.c
index f84cacd7ead..9334ab24a61 100644
--- a/drivers/block/rkmtd.c
+++ b/drivers/block/rkmtd.c
@@ -935,7 +935,7 @@ int rkmtd_detach_mtd(struct udevice *dev)
return 0;
}
-struct rkmtd_ops rkmtd_ops = {
+static const struct rkmtd_ops rkmtd_ops = {
.attach_mtd = rkmtd_attach_mtd,
.detach_mtd = rkmtd_detach_mtd,
};
--
2.53.0
More information about the U-Boot
mailing list