]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
dm: core: Avoid calling dm_scan_fdt_dev() with of-platdata
authorSimon Glass <sjg@chromium.org>
Sat, 29 Jul 2017 17:34:52 +0000 (11:34 -0600)
committerJaehoon Chung <jh80.chung@samsung.com>
Thu, 17 Aug 2017 07:44:16 +0000 (16:44 +0900)
We cannot call dm_scan_fdt_dev() with of-platdata since there is no device
tree. Fix this with an #if check.

Fixes: 3be9a37 (dm: syscon: scan sub-nodes of the syscon node)
Signed-off-by: Simon Glass <sjg@chromium.org>
drivers/core/syscon-uclass.c

index 2148469abc10e1e13468bc0ed58c695446d20c08..a69937e63c15d6db1a96baa6b28715c7f3ddb51a 100644 (file)
@@ -104,5 +104,8 @@ static const struct udevice_id generic_syscon_ids[] = {
 U_BOOT_DRIVER(generic_syscon) = {
        .name   = "syscon",
        .id     = UCLASS_SYSCON,
+#if !CONFIG_IS_ENABLED(OF_PLATDATA)
+       .bind           = dm_scan_fdt_dev,
+#endif
        .of_match = generic_syscon_ids,
 };