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:
parent
51e97d11dc
commit
34e8a227d4
|
@ -190,6 +190,7 @@ struct reset_control *of_reset_control_get(struct device_node *node,
|
||||||
|
|
||||||
rstc->rcdev = rcdev;
|
rstc->rcdev = rcdev;
|
||||||
rstc->id = rstc_id;
|
rstc->id = rstc_id;
|
||||||
|
rstc->gpio = -ENODEV;
|
||||||
|
|
||||||
return rstc;
|
return rstc;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue