summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMark Cave-Ayland <mark.cave-ayland@ilande.co.uk>2019-08-18 21:16:50 +0100
committerMark Cave-Ayland <mark.cave-ayland@ilande.co.uk>2019-08-18 21:16:50 +0100
commitadd8a184fbb2c8cf543f54f8927fb445f288ec18 (patch)
tree53f1b166fffc6b2f1e95f644832bfd3277976b75
parent2dfafd921f3b45e047a2d71f2e32373787b3a0be (diff)
downloadqemu-openbios-add8a184fbb2c8cf543f54f8927fb445f288ec18.tar.gz
virtio: convert to use BIND_NODE_METHODS() macro
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
-rw-r--r--drivers/virtio.c6
1 files 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);
}