[PATCH] spi: apple: Staticize and constify driver ops

Mark Kettenis mark.kettenis at xs4all.nl
Sun May 10 22:46:52 CEST 2026


> From: Marek Vasut <marek.vasut+renesas at mailbox.org>
> Date: Sun, 10 May 2026 19:16:17 +0200
> 
> 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>

Acked-by: Mark Kettenis <kettenis at openbsd.org>

> ---
> Cc: Tom Rini <trini at konsulko.com>
> Cc: u-boot at lists.denx.de
> ---
>  drivers/spi/apple_spi.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/spi/apple_spi.c b/drivers/spi/apple_spi.c
> index 5f94e9f7a74..acb74886708 100644
> --- a/drivers/spi/apple_spi.c
> +++ b/drivers/spi/apple_spi.c
> @@ -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,
> -- 
> 2.53.0
> 
> 


More information about the U-Boot mailing list