@@ -1009,6 +1009,13 @@ static void __init __maybe_unused changeset_check_u32_array(struct device_node *
1009
1009
}
1010
1010
}
1011
1011
1012
+ static void __init __maybe_unused changeset_check_bool (struct device_node * np ,
1013
+ const char * prop_name )
1014
+ {
1015
+ unittest (of_property_read_bool (np , prop_name ),
1016
+ "%s value mismatch (read 'false', exp 'true')\n" , prop_name );
1017
+ }
1018
+
1012
1019
static void __init of_unittest_changeset_prop (void )
1013
1020
{
1014
1021
#ifdef CONFIG_OF_DYNAMIC
@@ -1044,6 +1051,9 @@ static void __init of_unittest_changeset_prop(void)
1044
1051
u32_array , ARRAY_SIZE (u32_array ));
1045
1052
unittest (ret == 0 , "failed to add prop-u32-array\n" );
1046
1053
1054
+ ret = of_changeset_add_prop_bool (& chgset , np , "prop-bool" );
1055
+ unittest (ret == 0 , "failed to add prop-bool\n" );
1056
+
1047
1057
of_node_put (np );
1048
1058
1049
1059
ret = of_changeset_apply (& chgset );
@@ -1058,6 +1068,7 @@ static void __init of_unittest_changeset_prop(void)
1058
1068
changeset_check_string_array (np , "prop-string-array" , str_array , ARRAY_SIZE (str_array ));
1059
1069
changeset_check_u32 (np , "prop-u32" , 1234 );
1060
1070
changeset_check_u32_array (np , "prop-u32-array" , u32_array , ARRAY_SIZE (u32_array ));
1071
+ changeset_check_bool (np , "prop-bool" );
1061
1072
1062
1073
of_node_put (np );
1063
1074
0 commit comments