Support to multi-threading and pthread interface (POSIX.1-2008) (#23)
[lunaix-os.git] / lunaix-os / hal / char / devnull.c
index 9806dc0359ec953f0573d7f2459234e854350227..410f3ba2cdf932276778011be925a00f91ef3c4c 100644 (file)
@@ -38,7 +38,7 @@ pdev_nulldev_init(struct device_def* def)
     devnull->ops.read_page = __null_rd_pg;
     devnull->ops.read = __null_rd;
 
     devnull->ops.read_page = __null_rd_pg;
     devnull->ops.read = __null_rd;
 
-    device_register(devnull, &def->class, "null");
+    register_device(devnull, &def->class, "null");
 
     return 0;
 }
 
     return 0;
 }
@@ -46,6 +46,5 @@ pdev_nulldev_init(struct device_def* def)
 static struct device_def devnull_def = {
     .name = "null",
     .class = DEVCLASSV(DEVIF_NON, DEVFN_PSEUDO, DEV_NULL, DEV_BUILTIN_NULL),
 static struct device_def devnull_def = {
     .name = "null",
     .class = DEVCLASSV(DEVIF_NON, DEVFN_PSEUDO, DEV_NULL, DEV_BUILTIN_NULL),
-    .init = pdev_nulldev_init
-};
-EXPORT_DEVICE(nulldev, &devnull_def, load_earlystage);
+    .init = pdev_nulldev_init};
+EXPORT_DEVICE(nulldev, &devnull_def, load_onboot);