summaryrefslogtreecommitdiff
path: root/drivers/of
diff options
context:
space:
mode:
authorRob Herring (Arm) <robh@kernel.org>2025-03-12 16:29:46 -0500
committerRob Herring (Arm) <robh@kernel.org>2025-03-14 18:01:42 -0500
commit590f5d6752f7d951d3549b259c1436940131703b (patch)
tree8a42854f0628077b034d5464bd44d6d294adb34a /drivers/of
parent3367838f5549d48172bce068ee958f715ae80428 (diff)
of: Move of_prop_val_eq() next to the single user
There's only a single user of of_prop_val_eq(), so move it to overlay.c. This removes one case of exposing struct property outside of the DT code. Signed-off-by: "Rob Herring (Arm)" <robh@kernel.org> Link: https://lore.kernel.org/r/20250312212947.1067337-1-robh@kernel.org Signed-off-by: Rob Herring (Arm) <robh@kernel.org>
Diffstat (limited to 'drivers/of')
-rw-r--r--drivers/of/overlay.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/of/overlay.c b/drivers/of/overlay.c
index 5a51c52b9729..1af6f52d0708 100644
--- a/drivers/of/overlay.c
+++ b/drivers/of/overlay.c
@@ -84,6 +84,12 @@ static int devicetree_state_flags;
#define DTSF_APPLY_FAIL 0x01
#define DTSF_REVERT_FAIL 0x02
+static int of_prop_val_eq(const struct property *p1, const struct property *p2)
+{
+ return p1->length == p2->length &&
+ !memcmp(p1->value, p2->value, (size_t)p1->length);
+}
+
/*
* If a changeset apply or revert encounters an error, an attempt will
* be made to undo partial changes, but may fail. If the undo fails