diff options
author | Sascha Hauer <s.hauer@pengutronix.de> | 2013-11-07 08:31:47 +0100 |
---|---|---|
committer | Sascha Hauer <s.hauer@pengutronix.de> | 2013-11-07 08:31:47 +0100 |
commit | ded25480d8c5e56d9dcbf53a88d05f023b9740c4 (patch) | |
tree | 8691bdf7f0fc801b08b114204c83d25007eb8fba /common | |
parent | b3055b0f6b1687089b914eb8cde5bbb73cfca7a1 (diff) | |
parent | 97607e85cdc44824e9617c74325bc9bc6405c383 (diff) | |
download | barebox-ded25480d8c5e56d9dcbf53a88d05f023b9740c4.tar.gz barebox-ded25480d8c5e56d9dcbf53a88d05f023b9740c4.tar.xz |
Merge branch 'for-next/rpi'
Diffstat (limited to 'common')
-rw-r--r-- | common/memory.c | 4 | ||||
-rw-r--r-- | common/oftree.c | 12 |
2 files changed, 9 insertions, 7 deletions
diff --git a/common/memory.c b/common/memory.c index 7ec211b8da..c82bbaaf4c 100644 --- a/common/memory.c +++ b/common/memory.c @@ -163,7 +163,7 @@ int release_sdram_region(struct resource *res) #ifdef CONFIG_OFTREE -static int of_memory_fixup(struct device_node *node) +static int of_memory_fixup(struct device_node *node, void *unused) { struct memory_bank *bank; int err; @@ -200,7 +200,7 @@ static int of_memory_fixup(struct device_node *node) static int of_register_memory_fixup(void) { - return of_register_fixup(of_memory_fixup); + return of_register_fixup(of_memory_fixup, NULL); } late_initcall(of_register_memory_fixup); #endif diff --git a/common/oftree.c b/common/oftree.c index f2a31692ec..50fc95b588 100644 --- a/common/oftree.c +++ b/common/oftree.c @@ -113,7 +113,7 @@ void of_print_cmdline(struct device_node *root) printf("commandline: %s\n", cmdline); } -static int of_fixup_bootargs(struct device_node *root) +static int of_fixup_bootargs(struct device_node *root, void *unused) { struct device_node *node; const char *str; @@ -135,22 +135,24 @@ static int of_fixup_bootargs(struct device_node *root) static int of_register_bootargs_fixup(void) { - return of_register_fixup(of_fixup_bootargs); + return of_register_fixup(of_fixup_bootargs, NULL); } late_initcall(of_register_bootargs_fixup); struct of_fixup { - int (*fixup)(struct device_node *); + int (*fixup)(struct device_node *, void *); + void *context; struct list_head list; }; static LIST_HEAD(of_fixup_list); -int of_register_fixup(int (*fixup)(struct device_node *)) +int of_register_fixup(int (*fixup)(struct device_node *, void *), void *context) { struct of_fixup *of_fixup = xzalloc(sizeof(*of_fixup)); of_fixup->fixup = fixup; + of_fixup->context = context; list_add_tail(&of_fixup->list, &of_fixup_list); @@ -167,7 +169,7 @@ int of_fix_tree(struct device_node *node) int ret; list_for_each_entry(of_fixup, &of_fixup_list, list) { - ret = of_fixup->fixup(node); + ret = of_fixup->fixup(node, of_fixup->context); if (ret) return ret; } |