]> git.ipfire.org Git - thirdparty/u-boot.git/commitdiff
spi: apple: Staticize and constify driver ops
authorMarek Vasut <marek.vasut+renesas@mailbox.org>
Sun, 10 May 2026 17:16:17 +0000 (19:16 +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>
Acked-by: Mark Kettenis <kettenis@openbsd.org>
drivers/spi/apple_spi.c

index 5f94e9f7a74db914d8cb33eb6493c682c6ce6a6d..acb748867082a969a7fac79baa1733bd714792c9 100644 (file)
@@ -228,7 +228,7 @@ static int apple_spi_set_mode(struct udevice *bus, uint mode)
        return 0;
 }
 
-struct dm_spi_ops apple_spi_ops = {
+static const struct dm_spi_ops apple_spi_ops = {
        .xfer = apple_spi_xfer,
        .set_speed = apple_spi_set_speed,
        .set_mode = apple_spi_set_mode,