diff options
Diffstat (limited to 'hw/spapr_rtas.c')
-rw-r--r-- | hw/spapr_rtas.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/hw/spapr_rtas.c b/hw/spapr_rtas.c index 6d5c48a740..e618c2db53 100644 --- a/hw/spapr_rtas.c +++ b/hw/spapr_rtas.c @@ -242,7 +242,7 @@ target_ulong spapr_rtas_call(sPAPREnvironment *spapr, return H_PARAMETER; } -void spapr_rtas_register(const char *name, spapr_rtas_fn fn) +int spapr_rtas_register(const char *name, spapr_rtas_fn fn) { int i; @@ -258,7 +258,7 @@ void spapr_rtas_register(const char *name, spapr_rtas_fn fn) rtas_next->name = name; rtas_next->fn = fn; - rtas_next++; + return (rtas_next++ - rtas_table) + TOKEN_BASE; } int spapr_rtas_device_tree_setup(void *fdt, hwaddr rtas_addr, @@ -301,7 +301,7 @@ int spapr_rtas_device_tree_setup(void *fdt, hwaddr rtas_addr, for (i = 0; i < TOKEN_MAX; i++) { struct rtas_call *call = &rtas_table[i]; - if (!call->fn) { + if (!call->name) { continue; } |