[OpenBIOS] [PATCH 3/5] ide: switch IDE init functions over to use new get_path_from_ph() helper
Mark Cave-Ayland
mark.cave-ayland at ilande.co.uk
Thu Dec 24 20:53:57 CET 2015
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland at ilande.co.uk>
---
openbios-devel/drivers/ide.c | 10 ++++------
1 file changed, 4 insertions(+), 6 deletions(-)
diff --git a/openbios-devel/drivers/ide.c b/openbios-devel/drivers/ide.c
index 51f1696..c63ddd8 100644
--- a/openbios-devel/drivers/ide.c
+++ b/openbios-devel/drivers/ide.c
@@ -1466,9 +1466,8 @@ int ob_ide_init(const char *path, uint32_t io_port0, uint32_t ctl_port0,
break;
}
IDE_DPRINTF("%s]: %s\n", media, drive->model);
- snprintf(nodebuff, sizeof(nodebuff),
- "%s/" DEV_NAME "/%s", path, current_channel,
- media);
+ snprintf(nodebuff, sizeof(nodebuff), "%s/%s",
+ get_path_from_ph(dnode), media);
REGISTER_NAMED_NODE_PHANDLE(ob_ide, nodebuff, dnode);
set_int_property(dnode, "reg", j);
@@ -1686,9 +1685,8 @@ int macio_ide_init(const char *path, uint32_t addr, int nb_channels)
break;
}
IDE_DPRINTF("%s]: %s\n", media, drive->model);
- snprintf(nodebuff, sizeof(nodebuff),
- "%s/" DEV_NAME "/%s", path, current_channel,
- media);
+ snprintf(nodebuff, sizeof(nodebuff), "%s/%s",
+ get_path_from_ph(dnode), media);
REGISTER_NAMED_NODE_PHANDLE(ob_ide, nodebuff, dnode);
set_int_property(dnode, "reg", j);
--
1.7.10.4
More information about the OpenBIOS
mailing list