Skip to content

Commit 590f5d6

Browse files
committed
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)" <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Rob Herring (Arm) <[email protected]>
1 parent 3367838 commit 590f5d6

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

drivers/of/overlay.c

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,12 @@ static int devicetree_state_flags;
8484
#define DTSF_APPLY_FAIL 0x01
8585
#define DTSF_REVERT_FAIL 0x02
8686

87+
static int of_prop_val_eq(const struct property *p1, const struct property *p2)
88+
{
89+
return p1->length == p2->length &&
90+
!memcmp(p1->value, p2->value, (size_t)p1->length);
91+
}
92+
8793
/*
8894
* If a changeset apply or revert encounters an error, an attempt will
8995
* be made to undo partial changes, but may fail. If the undo fails

include/linux/of.h

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -908,12 +908,6 @@ static inline const void *of_device_get_match_data(const struct device *dev)
908908
#define of_node_cmp(s1, s2) strcasecmp((s1), (s2))
909909
#endif
910910

911-
static inline int of_prop_val_eq(const struct property *p1, const struct property *p2)
912-
{
913-
return p1->length == p2->length &&
914-
!memcmp(p1->value, p2->value, (size_t)p1->length);
915-
}
916-
917911
#define for_each_property_of_node(dn, pp) \
918912
for (pp = dn->properties; pp != NULL; pp = pp->next)
919913

0 commit comments

Comments
 (0)