]> git.ipfire.org Git - thirdparty/u-boot.git/commitdiff
power: pmic: emul: Staticize and constify driver ops
authorMarek Vasut <marek.vasut+renesas@mailbox.org>
Fri, 8 May 2026 12:23:58 +0000 (14:23 +0200)
committerPeng Fan <peng.fan@nxp.com>
Fri, 15 May 2026 03:46:04 +0000 (11:46 +0800)
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>
Reviewed-by: Peng Fan <peng.fan@nxp.com>
Signed-off-by: Peng Fan <peng.fan@nxp.com>
drivers/power/pmic/i2c_pmic_emul.c

index 6e81b9c34279d9b2a70c3bd287973b97000bbbf5..b5c8efd427ad6cc3405a20b54bca96127c286904 100644 (file)
@@ -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,
 };