[PATCH 14/18] Make flatdevtree_misc's cxt global.
From: Scott Wood <hidden>
Date: 2007-01-24 21:07:29
This allows platform code to use flatdevtree functions directly. Signed-off-by: Scott Wood <redacted> --- arch/powerpc/boot/flatdevtree_misc.c | 14 +++++++------- 1 files changed, 7 insertions(+), 7 deletions(-)
diff --git a/arch/powerpc/boot/flatdevtree_misc.c b/arch/powerpc/boot/flatdevtree_misc.c
index 04da38f..da49ffb 100644
--- a/arch/powerpc/boot/flatdevtree_misc.c
+++ b/arch/powerpc/boot/flatdevtree_misc.c@@ -14,29 +14,29 @@ #include "flatdevtree.h" #include "ops.h" -static struct ft_cxt cxt; +struct ft_cxt fdtm_cxt; static void *ft_finddevice(const char *name) { - return ft_find_device(&cxt, name); + return ft_find_device(&fdtm_cxt, name); } static int ft_getprop(const void *phandle, const char *propname, void *buf, const int buflen) { - return ft_get_prop(&cxt, phandle, propname, buf, buflen); + return ft_get_prop(&fdtm_cxt, phandle, propname, buf, buflen); } static int ft_setprop(const void *phandle, const char *propname, const void *buf, const int buflen) { - return ft_set_prop(&cxt, phandle, propname, buf, buflen); + return ft_set_prop(&fdtm_cxt, phandle, propname, buf, buflen); } static unsigned long ft_finalize(void) { - ft_end_tree(&cxt); - return (unsigned long)cxt.bph; + ft_end_tree(&fdtm_cxt); + return (unsigned long)fdtm_cxt.bph; } int ft_init(void *dt_blob, unsigned int max_size, unsigned int max_find_device)
@@ -46,6 +46,6 @@ int ft_init(void *dt_blob, unsigned int dt_ops.setprop = ft_setprop; dt_ops.finalize = ft_finalize; - return ft_open(&cxt, dt_blob, max_size, max_find_device, + return ft_open(&fdtm_cxt, dt_blob, max_size, max_find_device, platform_ops.realloc); }
--
1.4.4