]> git.ipfire.org Git - thirdparty/u-boot.git/commitdiff
power: domain: apple: Staticize and constify driver ops
authorMarek Vasut <marek.vasut+renesas@mailbox.org>
Fri, 8 May 2026 12:22:01 +0000 (14:22 +0200)
committerPeng Fan <peng.fan@nxp.com>
Fri, 15 May 2026 03:47:21 +0000 (11:47 +0800)
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@mailbox.org>
Reviewed-by: Peng Fan <peng.fan@nxp.com>
Signed-off-by: Peng Fan <peng.fan@nxp.com>
drivers/power/domain/apple-pmgr.c

index bf9940621ee7f39392e45058165840cd4f6e7b5c..37fac815242e5b5f24176ae9e19b48389a17398b 100644 (file)
@@ -67,7 +67,7 @@ static int apple_reset_deassert(struct reset_ctl *reset_ctl)
        return 0;
 }
 
-struct reset_ops apple_reset_ops = {
+static const struct reset_ops apple_reset_ops = {
        .of_xlate = apple_reset_of_xlate,
        .rst_assert = apple_reset_assert,
        .rst_deassert = apple_reset_deassert,
@@ -138,7 +138,7 @@ static int apple_pmgr_probe(struct udevice *dev)
        return 0;
 }
 
-struct power_domain_ops apple_pmgr_ops = {
+static const struct power_domain_ops apple_pmgr_ops = {
        .on = apple_pmgr_on,
        .of_xlate = apple_pmgr_of_xlate,
 };