diff options
| author | Marek Vasut <[email protected]> | 2026-06-12 04:05:38 +0200 |
|---|---|---|
| committer | Tom Rini <[email protected]> | 2026-06-29 15:29:44 -0600 |
| commit | d5046398433e48e7b0b664c1ee3e4e2af6f861a8 (patch) | |
| tree | 571f8cf78a888d523b597261385e62aadb88ad68 /drivers/gpio | |
| parent | 4a0990218aa9185c2ccd7986dc1ad14b24aaaa9d (diff) | |
treewide: Staticize and constify acpi ops
Set the acpi_ops structure as static const where applicable. The
The structure is not accessible from outside of drivers and is not
going to be modified at runtime. The structure may be unused in a
couple of drivers depending on their configuration, mark those
sites with __maybe_unused .
Signed-off-by: Marek Vasut <[email protected]>
Reviewed-by: Simon Glass <[email protected]>
Diffstat (limited to 'drivers/gpio')
| -rw-r--r-- | drivers/gpio/sandbox.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/gpio/sandbox.c b/drivers/gpio/sandbox.c index e8f50d815d7..76aff0ed5aa 100644 --- a/drivers/gpio/sandbox.c +++ b/drivers/gpio/sandbox.c @@ -306,7 +306,7 @@ static int sb_gpio_get_name(const struct udevice *dev, char *out_name) return acpi_copy_name(out_name, "GPIO"); } -struct acpi_ops gpio_sandbox_acpi_ops = { +static const struct acpi_ops gpio_sandbox_acpi_ops = { .get_name = sb_gpio_get_name, }; #endif /* ACPIGEN */ @@ -568,7 +568,7 @@ static struct pinctrl_ops sandbox_pinctrl_gpio_ops = { }; #if CONFIG_IS_ENABLED(ACPIGEN) -struct acpi_ops pinctrl_sandbox_acpi_ops = { +static const struct acpi_ops pinctrl_sandbox_acpi_ops = { .get_name = sb_pinctrl_get_name, }; #endif |
