summaryrefslogtreecommitdiffstats
path: root/drivers/reset
diff options
context:
space:
mode:
authorLucas Stach <dev@lynxeye.de>2016-01-10 22:36:00 +0100
committerSascha Hauer <s.hauer@pengutronix.de>2016-01-11 11:26:12 +0100
commit34e8a227d4e0810cb58f34457ca9f802a6ffde7c (patch)
tree820c519a2e8a1b4a15d56dbb67273fe5332d363d /drivers/reset
parent51e97d11dc81e12c2d8bddc1e79f6d40de49f3de (diff)
downloadbarebox-34e8a227d4e0810cb58f34457ca9f802a6ffde7c.tar.gz
reset: fix non GPIO reset
The reset controller structure is zero initialized in the OF reset case, but as 0 is also a valid GPIO number the current code tries to assert/deassert the GPIO instead of calling into the reset controller device. Signed-off-by: Lucas Stach <dev@lynxeye.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'drivers/reset')
-rw-r--r--drivers/reset/core.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/reset/core.c b/drivers/reset/core.c
index 0f900a9..59f75ca 100644
--- a/drivers/reset/core.c
+++ b/drivers/reset/core.c
@@ -190,6 +190,7 @@ struct reset_control *of_reset_control_get(struct device_node *node,
rstc->rcdev = rcdev;
rstc->id = rstc_id;
+ rstc->gpio = -ENODEV;
return rstc;
}