[U-Boot] [PATCH v3 69/72] dm: sandbox: sysreset: Convert driver to livetree
Simon Glass
sjg at chromium.org
Fri May 19 02:09:59 UTC 2017
Update this driver to support a live device tree.
Signed-off-by: Simon Glass <sjg at chromium.org>
---
Changes in v3: None
Changes in v2: None
drivers/sysreset/sysreset_sandbox.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/sysreset/sysreset_sandbox.c b/drivers/sysreset/sysreset_sandbox.c
index 0c4e2e1a93..12b3e5f86e 100644
--- a/drivers/sysreset/sysreset_sandbox.c
+++ b/drivers/sysreset/sysreset_sandbox.c
@@ -41,7 +41,7 @@ static int sandbox_sysreset_request(struct udevice *dev, enum sysreset_t type)
* (see the U_BOOT_DEVICE() declaration below) should not do anything.
* If we are that device, return an error.
*/
- if (state->fdt_fname && dev_of_offset(dev) == -1)
+ if (state->fdt_fname && !dev_of_valid(dev))
return -ENODEV;
switch (type) {
--
2.13.0.303.g4ebf302169-goog
More information about the U-Boot
mailing list