From add8a184fbb2c8cf543f54f8927fb445f288ec18 Mon Sep 17 00:00:00 2001 From: Mark Cave-Ayland Date: Sun, 18 Aug 2019 21:16:50 +0100 Subject: virtio: convert to use BIND_NODE_METHODS() macro Signed-off-by: Mark Cave-Ayland --- drivers/virtio.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/virtio.c b/drivers/virtio.c index 171db5a6..6008ae95 100644 --- a/drivers/virtio.c +++ b/drivers/virtio.c @@ -503,12 +503,11 @@ void ob_virtio_init(const char *path, const char *dev_name, uint64_t common_cfg, ucell addr; VDev *vdev, **_vdev; - REGISTER_NODE_METHODS(ob_virtio, path); - /* Open ob_virtio */ fword("my-self"); push_str(path); feval("open-dev to my-self"); + BIND_NODE_METHODS(get_cur_dev(), ob_virtio); ph = find_ih_method("vdev", my_self()); PUSH(ph); @@ -546,10 +545,9 @@ void ob_virtio_init(const char *path, const char *dev_name, uint64_t common_cfg, push_str("_vdev"); fword("property"); + BIND_NODE_METHODS(get_cur_dev(), ob_virtio_disk); fword("finish-device"); snprintf(buf, sizeof(buf), "%s/disk", path); - REGISTER_NODE_METHODS(ob_virtio_disk, buf); - set_virtio_alias(buf, idx); } -- cgit v1.2.1