diff --git a/tools/lint/commands.c b/tools/lint/commands.c
index d82e6e9..524eabb 100644
--- a/tools/lint/commands.c
+++ b/tools/lint/commands.c
@@ -346,7 +346,7 @@
     const char *out_path = NULL, *target_path = NULL;
     const struct lys_module *module;
     LYS_OUTFORMAT format = LYS_OUT_TREE;
-    struct lyp_out *out = NULL;
+    struct ly_out *out = NULL;
     static struct option long_options[] = {
         {"help", no_argument, 0, 'h'},
         {"format", required_argument, 0, 'f'},
@@ -494,9 +494,9 @@
     }
 
     if (out_path) {
-        out = lyp_new_filepath(out_path);
+        out = ly_out_new_filepath(out_path);
     } else {
-        out = lyp_new_file(stdout);
+        out = ly_out_new_file(stdout);
     }
     if (!out) {
         fprintf(stderr, "Could not open the output file (%s).\n", strerror(errno));
@@ -518,7 +518,7 @@
     free(*argv);
     free(argv);
 
-    lyp_free(out, NULL, out_path ? 1 : 0);
+    ly_out_free(out, NULL, out_path ? 1 : 0);
 
     return ret;
 }
@@ -700,7 +700,7 @@
     struct lyd_node *tree = NULL;
     const struct lyd_node **trees = NULL;
     LYD_FORMAT outformat = 0;
-    struct lyp_out *out = NULL;
+    struct ly_out *out = NULL;
     static struct option long_options[] = {
         {"defaults", required_argument, 0, 'd'},
         {"help", no_argument, 0, 'h'},
@@ -835,9 +835,9 @@
     }
 
     if (out_path) {
-        out = lyp_new_filepath(out_path);
+        out = ly_out_new_filepath(out_path);
     } else {
-        out = lyp_new_file(stdout);
+        out = ly_out_new_file(stdout);
     }
     if (!out) {
         fprintf(stderr, "Could not open the output file (%s).\n", strerror(errno));
@@ -854,7 +854,7 @@
     free(*argv);
     free(argv);
 
-    lyp_free(out, NULL, out_path ? 1 : 0);
+    ly_out_free(out, NULL, out_path ? 1 : 0);
 
     lyd_free_all(data);
 
diff --git a/tools/lint/main_ni.c b/tools/lint/main_ni.c
index 7a16b62..67bd6ae 100644
--- a/tools/lint/main_ni.c
+++ b/tools/lint/main_ni.c
@@ -301,7 +301,7 @@
         {NULL,               required_argument, NULL, 'y'},
         {NULL,               0,                 NULL, 0}
     };
-    struct lyp_out *out = NULL;
+    struct ly_out *out = NULL;
     struct ly_ctx *ctx = NULL;
     const struct lys_module *mod;
     LYS_OUTFORMAT outformat_s = 0;
@@ -472,12 +472,12 @@
 #endif
         case 'o':
             if (out) {
-                if (lyp_filepath(out, optarg) != NULL) {
+                if (ly_out_filepath(out, optarg) != NULL) {
                     fprintf(stderr, "yanglint error: unable open output file %s (%s)\n", optarg, strerror(errno));
                     goto cleanup;
                 }
             } else {
-                out = lyp_new_filepath(optarg);
+                out = ly_out_new_filepath(optarg);
                 if (!out) {
                     fprintf(stderr, "yanglint error: unable open output file %s (%s)\n", optarg, strerror(errno));
                     goto cleanup;
@@ -775,7 +775,7 @@
         } else {
             for (u = 0; u < mods->count; u++) {
                 if (u) {
-                    lyp_print(out, "\n");
+                    ly_print(out, "\n");
                 }
                 lys_print(out, (struct lys_module *)mods->objs[u], outformat_s, outline_length_s, outoptions_s);
             }
@@ -1093,6 +1093,6 @@
     }
     ly_ctx_destroy(ctx, NULL);
 
-    lyp_free(out, NULL, 1);
+    ly_out_free(out, NULL, 1);
     return ret;
 }
