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
commit2dfafd921f3b45e047a2d71f2e32373787b3a0be (patch)
tree49b6a13a64912edf3bb156b9806f00de23b8ea1f
parent5cef1d53403ea01c3bec1f0df1530f393aab8a0b (diff)
downloadqemu-openbios-2dfafd921f3b45e047a2d71f2e32373787b3a0be.tar.gz
lsi: convert to use BIND_NODE_METHODS() macro
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
-rw-r--r--drivers/lsi.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/drivers/lsi.c b/drivers/lsi.c
index 37e4b9da..bc4893a5 100644
--- a/drivers/lsi.c
+++ b/drivers/lsi.c
@@ -642,7 +642,7 @@ ob_lsi_init(const char *path, uint64_t mmio, uint64_t ram)
int i;
ucell addr;
- REGISTER_NODE_METHODS(ob_lsi, path);
+ BIND_NODE_METHODS(ph, ob_lsi);
lsi = malloc(sizeof(lsi_private_t));
if (!lsi) {
@@ -744,10 +744,13 @@ ob_lsi_init(const char *path, uint64_t mmio, uint64_t ram)
fword("encode+");
push_str("reg");
fword("property");
+
+ BIND_NODE_METHODS(get_cur_dev(), ob_sd);
fword("finish-device");
+
snprintf(nodebuff, sizeof(nodebuff), "%s/sd@%d",
get_path_from_ph(ph), id);
- REGISTER_NODE_METHODS(ob_sd, nodebuff);
+
if (lsi->sd[id].media == TYPE_ROM) {
counter_ptr = &cdcount;
} else {