[PATCH] mtd: spi: bootstd: Staticize and constify driver ops

Marek Vasut marek.vasut+renesas at mailbox.org
Fri May 8 00:08:10 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: Takahiro Kuwano <takahiro.kuwano at infineon.com>
Cc: Tom Rini <trini at konsulko.com>
Cc: Vignesh R <vigneshr at ti.com>
Cc: u-boot at lists.denx.de
---
 drivers/mtd/spi/sf_bootdev.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/mtd/spi/sf_bootdev.c b/drivers/mtd/spi/sf_bootdev.c
index 017a74a3016..6ace4ee0aed 100644
--- a/drivers/mtd/spi/sf_bootdev.c
+++ b/drivers/mtd/spi/sf_bootdev.c
@@ -57,7 +57,7 @@ static int sf_bootdev_bind(struct udevice *dev)
 	return 0;
 }
 
-struct bootdev_ops sf_bootdev_ops = {
+static const struct bootdev_ops sf_bootdev_ops = {
 	.get_bootflow	= sf_get_bootflow,
 };
 
-- 
2.53.0



More information about the U-Boot mailing list