]> git.ipfire.org Git - thirdparty/u-boot.git/commitdiff
rtc: emul: Staticize and constify driver ops
authorMarek Vasut <marek.vasut+renesas@mailbox.org>
Sat, 9 May 2026 15:13:32 +0000 (17:13 +0200)
committerTom Rini <trini@konsulko.com>
Mon, 18 May 2026 22:56:07 +0000 (16:56 -0600)
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: Simon Glass <sjg@chromium.org>
drivers/rtc/i2c_rtc_emul.c

index ea11c72c964c952b08a7354df0d003f66f316526..41bdf275f1eb98a413577c0c776f8371ec3e98cc 100644 (file)
@@ -191,7 +191,7 @@ static int sandbox_i2c_rtc_xfer(struct udevice *emul, struct i2c_msg *msg,
        return 0;
 }
 
-struct dm_i2c_ops sandbox_i2c_rtc_emul_ops = {
+static const struct dm_i2c_ops sandbox_i2c_rtc_emul_ops = {
        .xfer = sandbox_i2c_rtc_xfer,
 };