U-Boot Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] power: pmic: emul: Staticize and constify driver ops
@ 2026-05-08 12:23 Marek Vasut
  2026-05-13 10:59 ` Peng Fan
  0 siblings, 1 reply; 2+ messages in thread
From: Marek Vasut @ 2026-05-08 12:23 UTC (permalink / raw)
  To: u-boot; +Cc: Marek Vasut, Jaehoon Chung, Peng Fan, Tom Rini

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@mailbox.org>
---
Cc: Jaehoon Chung <jh80.chung@samsung.com>
Cc: Peng Fan <peng.fan@nxp.com>
Cc: Tom Rini <trini@konsulko.com>
Cc: u-boot@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


^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2026-05-13 10:56 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-05-08 12:23 [PATCH] power: pmic: emul: Staticize and constify driver ops Marek Vasut
2026-05-13 10:59 ` Peng Fan

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox