data parser CHANGE unify API with schema parser and use input handler
diff --git a/src/tree_data_helpers.c b/src/tree_data_helpers.c
index 36d540c..aa7fd63 100644
--- a/src/tree_data_helpers.c
+++ b/src/tree_data_helpers.c
@@ -22,6 +22,7 @@
 #include "hash_table.h"
 #include "log.h"
 #include "lyb.h"
+#include "parser_data.h"
 #include "set.h"
 #include "tree.h"
 #include "tree_data.h"
@@ -170,7 +171,7 @@
     struct lyd_meta *meta2, *prev_meta = NULL;
 
     if (!(node->schema->nodetype & (LYS_RPC | LYS_ACTION | LYS_NOTIF)) && node->schema->when) {
-        if (options & LYD_OPT_TRUSTED) {
+        if (options & LYD_PARSE_TRUSTED) {
             /* just set it to true */
             node->flags |= LYD_WHEN_TRUE;
         } else {
@@ -179,7 +180,7 @@
         }
     }
 
-    if (options & LYD_OPT_TRUSTED) {
+    if (options & LYD_PARSE_TRUSTED) {
         /* node is valid */
         node->flags &= ~LYD_NEW;
     }