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/cpu | |
| 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/cpu')
| -rw-r--r-- | drivers/cpu/armv8_cpu.c | 2 | ||||
| -rw-r--r-- | drivers/cpu/bcm283x_cpu.c | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/drivers/cpu/armv8_cpu.c b/drivers/cpu/armv8_cpu.c index ed87841b723..337661c23a8 100644 --- a/drivers/cpu/armv8_cpu.c +++ b/drivers/cpu/armv8_cpu.c @@ -124,7 +124,7 @@ int armv8_cpu_fill_madt(const struct udevice *dev, struct acpi_ctx *ctx) return 0; } -static struct acpi_ops armv8_cpu_acpi_ops = { +static const struct acpi_ops armv8_cpu_acpi_ops = { .fill_ssdt = armv8_cpu_fill_ssdt, .fill_madt = armv8_cpu_fill_madt, }; diff --git a/drivers/cpu/bcm283x_cpu.c b/drivers/cpu/bcm283x_cpu.c index ad638cd8fff..43e74d1811b 100644 --- a/drivers/cpu/bcm283x_cpu.c +++ b/drivers/cpu/bcm283x_cpu.c @@ -193,7 +193,7 @@ static int bcm_cpu_probe(struct udevice *dev) return ret; } -struct acpi_ops bcm283x_cpu_acpi_ops = { +static const struct acpi_ops __maybe_unused bcm283x_cpu_acpi_ops = { .fill_ssdt = armv8_cpu_fill_ssdt, .fill_madt = armv8_cpu_fill_madt, }; |
