]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
dm: sandbox: sysreset: Convert driver to livetree
authorSimon Glass <sjg@chromium.org>
Fri, 19 May 2017 02:09:59 +0000 (20:09 -0600)
committerSimon Glass <sjg@chromium.org>
Thu, 1 Jun 2017 13:03:17 +0000 (07:03 -0600)
Update this driver to support a live device tree.

Signed-off-by: Simon Glass <sjg@chromium.org>
drivers/sysreset/sysreset_sandbox.c

index 0c4e2e1a93a696903cee0c8fb8f6e7e303854155..12b3e5f86eb0fbc940d57f8200ae68360f819e50 100644 (file)
@@ -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) {