[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-changelog] [xen master] xen/dts: replace get_val by dt_next_cell
commit c3cc9e6c4b5dfb6741b8751b608b5c872d829604 Author: Julien Grall <julien.grall@xxxxxxxxxx> AuthorDate: Fri Sep 13 13:49:32 2013 +0100 Commit: Ian Campbell <ian.campbell@xxxxxxxxxx> CommitDate: Tue Sep 17 15:29:13 2013 +0100 xen/dts: replace get_val by dt_next_cell Signed-off-by: Julien Grall <julien.grall@xxxxxxxxxx> Acked-by: Ian Campbell <ian.campbell@xxxxxxxxxx> --- xen/common/device_tree.c | 18 ++---------------- 1 files changed, 2 insertions(+), 16 deletions(-) diff --git a/xen/common/device_tree.c b/xen/common/device_tree.c index eac507d..ee58c52 100644 --- a/xen/common/device_tree.c +++ b/xen/common/device_tree.c @@ -154,25 +154,11 @@ static bool_t __init device_tree_node_compatible(const void *fdt, int node, return 0; } -static void __init get_val(const __be32 **cell, u32 cells, u64 *val) -{ - *val = 0; - - if ( cells > 2 ) - early_panic("dtb value contains > 2 cells\n"); - - while ( cells-- ) - { - *val <<= 32; - *val |= fdt32_to_cpu(*(*cell)++); - } -} - static void __init device_tree_get_reg(const __be32 **cell, u32 address_cells, u32 size_cells, u64 *start, u64 *size) { - get_val(cell, address_cells, start); - get_val(cell, size_cells, size); + *start = dt_next_cell(address_cells, cell); + *size = dt_next_cell(size_cells, cell); } void dt_get_range(const __be32 **cell, const struct dt_device_node *np, -- generated by git-patchbot for /home/xen/git/xen.git#master _______________________________________________ Xen-changelog mailing list Xen-changelog@xxxxxxxxxxxxx http://lists.xensource.com/xen-changelog
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |