summaryrefslogtreecommitdiff
path: root/drivers/sysreset/sysreset_syscon.c
diff options
context:
space:
mode:
authorTom Rini <trini@konsulko.com>2019-04-13 08:27:35 -0400
committerTom Rini <trini@konsulko.com>2019-04-13 08:27:35 -0400
commitcf5eebeb18f7790d5030eb94f51fca0ebcd6e406 (patch)
treef4c9c40f9353fbe4104875779c7eedd3ed2342cc /drivers/sysreset/sysreset_syscon.c
parent0a5228be868622894a5f8f226203cd7bac562187 (diff)
parent73c02e5e4fc1ef53d06289232edd6cc52e3d73f6 (diff)
Merge tag 'pull-12apr19' of git://git.denx.de/u-boot-dm
fdtdec tests and improvements for carve-outs pinctrl race-condition fix various other fixes in sandbox, sound, mkimage, etc.
Diffstat (limited to 'drivers/sysreset/sysreset_syscon.c')
-rw-r--r--drivers/sysreset/sysreset_syscon.c15
1 files changed, 2 insertions, 13 deletions
diff --git a/drivers/sysreset/sysreset_syscon.c b/drivers/sysreset/sysreset_syscon.c
index 34506402ac..3fb39b9952 100644
--- a/drivers/sysreset/sysreset_syscon.c
+++ b/drivers/sysreset/sysreset_syscon.c
@@ -36,20 +36,9 @@ static struct sysreset_ops syscon_reboot_ops = {
int syscon_reboot_probe(struct udevice *dev)
{
struct syscon_reboot_priv *priv = dev_get_priv(dev);
- int err;
- u32 phandle;
- ofnode node;
- err = ofnode_read_u32(dev_ofnode(dev), "regmap", &phandle);
- if (err)
- return err;
-
- node = ofnode_get_by_phandle(phandle);
- if (!ofnode_valid(node))
- return -EINVAL;
-
- priv->regmap = syscon_node_to_regmap(node);
- if (!priv->regmap) {
+ priv->regmap = syscon_regmap_lookup_by_phandle(dev, "regmap");
+ if (IS_ERR(priv->regmap)) {
pr_err("unable to find regmap\n");
return -ENODEV;
}