[PATCH] reset: fix non GPIO reset

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxx>
---
Sascha, please apply this to master, as without this change
Tegra is broken there.
---
 drivers/reset/core.c | 1 +
 1 file changed, 1 insertion(+)

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


_______________________________________________
barebox mailing list
barebox@xxxxxxxxxxxxxxxxxxx
http://lists.infradead.org/mailman/listinfo/barebox



[Index of Archives]     [Linux Embedded]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux