File tree Expand file tree Collapse file tree 1 file changed +16
-0
lines changed Expand file tree Collapse file tree 1 file changed +16
-0
lines changed Original file line number Diff line number Diff line change @@ -1065,6 +1065,22 @@ static inline int of_parse_phandle_with_optional_args(const struct device_node *
1065
1065
0 , index , out_args );
1066
1066
}
1067
1067
1068
+ /**
1069
+ * of_phandle_args_equal() - Compare two of_phandle_args
1070
+ * @a1: First of_phandle_args to compare
1071
+ * @a2: Second of_phandle_args to compare
1072
+ *
1073
+ * Return: True if a1 and a2 are the same (same node pointer, same phandle
1074
+ * args), false otherwise.
1075
+ */
1076
+ static inline bool of_phandle_args_equal (const struct of_phandle_args * a1 ,
1077
+ const struct of_phandle_args * a2 )
1078
+ {
1079
+ return a1 -> np == a2 -> np &&
1080
+ a1 -> args_count == a2 -> args_count &&
1081
+ !memcmp (a1 -> args , a2 -> args , sizeof (a1 -> args [0 ]) * a1 -> args_count );
1082
+ }
1083
+
1068
1084
/**
1069
1085
* of_property_count_u8_elems - Count the number of u8 elements in a property
1070
1086
*
You can’t perform that action at this time.
0 commit comments