From 6daabf01f569ab4a7e3f58b9f44a99f5b2840760 Mon Sep 17 00:00:00 2001 From: Mark Cave-Ayland Date: Sun, 18 Aug 2019 21:16:50 +0100 Subject: nvram: convert to use BIND_NODE_METHODS() macro Signed-off-by: Mark Cave-Ayland --- drivers/macio.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'drivers') diff --git a/drivers/macio.c b/drivers/macio.c index eb2af04a..5a94252c 100644 --- a/drivers/macio.c +++ b/drivers/macio.c @@ -91,9 +91,8 @@ void macio_nvram_init(const char *path, phys_addr_t addr) nvram_size = macio_nvram_size(); nvram = (char*)addr + nvram_offset; - snprintf(buf, sizeof(buf), "%s/nvram", path); - nvram_init(buf); - dnode = find_dev(buf); + snprintf(buf, sizeof(buf), "%s", path); + dnode = nvram_init(buf); set_int_property(dnode, "#bytes", arch_nvram_size() ); props[0] = __cpu_to_be32(nvram_offset); props[1] = __cpu_to_be32(nvram_size); @@ -102,6 +101,7 @@ void macio_nvram_init(const char *path, phys_addr_t addr) NEWWORLD(set_property(dnode, "compatible", "nvram,flash", 12)); chosen = find_dev("/chosen"); + snprintf(buf, sizeof(buf), "%s", get_path_from_ph(dnode)); push_str(buf); fword("open-dev"); set_int_property(chosen, "nvram", POP()); @@ -395,7 +395,7 @@ ob_macio_keylargo_init(const char *path, phys_addr_t addr) } /* The NewWorld NVRAM is not located in the MacIO device */ - macio_nvram_init("", 0); + macio_nvram_init("/", 0); escc_init(path, addr); macio_ide_init(path, addr, 2); openpic_init(path, addr); -- cgit v1.2.1