]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
x86: apl: Use const for driver operations
authorSimon Glass <sjg@chromium.org>
Wed, 23 Dec 2020 15:11:26 +0000 (08:11 -0700)
committerSimon Glass <sjg@chromium.org>
Tue, 5 Jan 2021 19:24:41 +0000 (12:24 -0700)
Update these declarations to const to ensure that the data ends up in the
rodata section.

Signed-off-by: Simon Glass <sjg@chromium.org>
arch/x86/cpu/apollolake/pmc.c
arch/x86/cpu/intel_common/p2sb.c

index 290b2cb3e71cce691e45c53a6cd78ba71b377d5a..c40065ab8cff83ab29bd0e76d3c0f6f5bb7ed0ec 100644 (file)
@@ -205,7 +205,7 @@ static int apl_pmc_probe(struct udevice *dev)
        return 0;
 }
 
-static struct acpi_pmc_ops apl_pmc_ops = {
+static const struct acpi_pmc_ops apl_pmc_ops = {
        .init                   = apl_pmc_fill_power_state,
        .prev_sleep_state       = apl_prev_sleep_state,
        .disable_tco            = apl_disable_tco,
index e6edab0b0560b1c7721f899ee69bac09c4afac99..3765eeeab0d9c3454e98274bc6cbc1eccd44e84e 100644 (file)
@@ -180,7 +180,7 @@ static int p2sb_child_post_bind(struct udevice *dev)
        return 0;
 }
 
-struct p2sb_ops p2sb_ops = {
+static const struct p2sb_ops p2sb_ops = {
        .set_hide       = intel_p2sb_set_hide,
 };