of/resolver: Simplify to be32_add_cpu()
This is the same as be32_add_cpu(), so simplify the code and remove the now unused local variable. Signed-off-by: Stephen Boyd <stephen.boyd@linaro.org> Reviewed-by: Frank Rowand <frowand.list@gmail.com> Signed-off-by: Rob Herring <robh@kernel.org>
This commit is contained in:
parent
77ea8a68c5
commit
d35d623f52
|
@ -165,7 +165,6 @@ static int adjust_local_phandle_references(struct device_node *local_fixups,
|
|||
struct property *prop_fix, *prop;
|
||||
int err, i, count;
|
||||
unsigned int off;
|
||||
phandle phandle;
|
||||
|
||||
if (!local_fixups)
|
||||
return 0;
|
||||
|
@ -195,9 +194,7 @@ static int adjust_local_phandle_references(struct device_node *local_fixups,
|
|||
if ((off + 4) > prop->length)
|
||||
return -EINVAL;
|
||||
|
||||
phandle = be32_to_cpu(*(__be32 *)(prop->value + off));
|
||||
phandle += phandle_delta;
|
||||
*(__be32 *)(prop->value + off) = cpu_to_be32(phandle);
|
||||
be32_add_cpu(prop->value + off, phandle_delta);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue