summaryrefslogtreecommitdiff
path: root/drivers/of/resolver.c
diff options
context:
space:
mode:
authorStephen Boyd <stephen.boyd@linaro.org>2017-10-13 10:35:57 +0300
committerRob Herring <robh@kernel.org>2017-10-17 00:42:56 +0300
commitd35d623f52f9bf58b2dc2fa08156de936e1d6770 (patch)
treeef67eeb1489be3e5722d368392891c6bdf4b4a97 /drivers/of/resolver.c
parent77ea8a68c54ede3fd60dadb6a49b597f6eb5aee7 (diff)
downloadlinux-d35d623f52f9bf58b2dc2fa08156de936e1d6770.tar.xz
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>
Diffstat (limited to 'drivers/of/resolver.c')
-rw-r--r--drivers/of/resolver.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/drivers/of/resolver.c b/drivers/of/resolver.c
index 99309cb7d372..2d58253bf2f7 100644
--- a/drivers/of/resolver.c
+++ b/drivers/of/resolver.c
@@ -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);
}
}