X-Git-Url: https://scm.lunaixsky.com/lunaix-os.git/blobdiff_plain/bdc143a7aa3f51a46eceec62b0b364599533fa21..3bda60093277ec3bc94439bcc6ae3bf7cef10e78:/lunaix-os/hal/char/devzero.c?ds=inline diff --git a/lunaix-os/hal/char/devzero.c b/lunaix-os/hal/char/devzero.c index c637a34..3eb9ea4 100644 --- a/lunaix-os/hal/char/devzero.c +++ b/lunaix-os/hal/char/devzero.c @@ -18,7 +18,7 @@ __zero_rd(struct device* dev, void* buf, size_t offset, size_t len) } static int -pdev_zerodev_init(struct device_def* def) +pdev_zerodev_create(struct device_def* def, morph_t* obj) { struct device* devzero = device_allocseq(NULL, NULL); devzero->ops.read_page = __zero_rd_pg; @@ -30,7 +30,8 @@ pdev_zerodev_init(struct device_def* def) } static struct device_def devzero_def = { - .name = "zero", - .class = DEVCLASSV(DEVIF_NON, DEVFN_PSEUDO, DEV_ZERO, DEV_BUILTIN_ZERO), - .init = pdev_zerodev_init}; + def_device_name("nihil"), + def_device_class(LUNAIX, PSEUDO, ZERO), + def_on_create(pdev_zerodev_create) +}; EXPORT_DEVICE(zerodev, &devzero_def, load_onboot);