[PATCH] i2c: designware_i2c: Staticize and constify driver ops
Maarten Brock
Maarten.Brock at sttls.nl
Fri May 8 11:06:43 CEST 2026
Hi Marek,
I don't see const being applied.
I seither the patch or the comment incorrect?
Kind regards,
Maarten
> -----Original Message-----
> From: U-Boot <u-boot-bounces at lists.denx.de> On Behalf Of Marek Vasut
> Sent: Friday 8 May 2026 0:06
> To: u-boot at lists.denx.de
> Cc: Marek Vasut <marek.vasut+renesas at mailbox.org>; Heiko Schocher <hs at nabladev.com>; Tom Rini <trini at konsulko.com>
> Subject: [PATCH] i2c: designware_i2c: Staticize and constify driver ops
>
> 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>
> ---
> Cc: Heiko Schocher <hs at nabladev.com>
> Cc: Tom Rini <trini at konsulko.com>
> Cc: u-boot at lists.denx.de
> ---
> drivers/i2c/designware_i2c_pci.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/i2c/designware_i2c_pci.c b/drivers/i2c/designware_i2c_pci.c
> index c21c412231c..ad4122c2abd 100644
> --- a/drivers/i2c/designware_i2c_pci.c
> +++ b/drivers/i2c/designware_i2c_pci.c
> @@ -168,7 +168,7 @@ static int dw_i2c_acpi_fill_ssdt(const struct udevice *dev,
> return 0;
> }
>
> -struct acpi_ops dw_i2c_acpi_ops = {
> +static struct acpi_ops dw_i2c_acpi_ops = {
> .fill_ssdt = dw_i2c_acpi_fill_ssdt,
> };
>
> --
> 2.53.0
More information about the U-Boot
mailing list