[PATCH] power: pmic: emul: Staticize and constify driver ops
Marek Vasut
marek.vasut+renesas at mailbox.org
Fri May 8 14:23:58 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: Jaehoon Chung <jh80.chung at samsung.com>
Cc: Peng Fan <peng.fan at nxp.com>
Cc: Tom Rini <trini at konsulko.com>
Cc: u-boot at lists.denx.de
---
drivers/power/pmic/i2c_pmic_emul.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/power/pmic/i2c_pmic_emul.c b/drivers/power/pmic/i2c_pmic_emul.c
index 6e81b9c3427..b5c8efd427a 100644
--- a/drivers/power/pmic/i2c_pmic_emul.c
+++ b/drivers/power/pmic/i2c_pmic_emul.c
@@ -146,7 +146,7 @@ static int sandbox_i2c_pmic_probe(struct udevice *emul)
return 0;
}
-struct dm_i2c_ops sandbox_i2c_pmic_emul_ops = {
+static const struct dm_i2c_ops sandbox_i2c_pmic_emul_ops = {
.xfer = sandbox_i2c_pmic_xfer,
};
--
2.53.0
More information about the U-Boot
mailing list