9
0
Fork 0

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>
This commit is contained in:
Lucas Stach 2016-01-10 22:36:00 +01:00 committed by Sascha Hauer
parent 51e97d11dc
commit 34e8a227d4
1 changed files with 1 additions and 0 deletions

View File

@ -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;
}