]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
dm: core: Drop uclass_find_device_by_phandle() with of-platdata
authorSimon Glass <sjg@chromium.org>
Mon, 15 Mar 2021 04:25:26 +0000 (17:25 +1300)
committerSimon Glass <sjg@chromium.org>
Fri, 26 Mar 2021 04:03:08 +0000 (17:03 +1300)
At present this function is included in the build but with of-platdata it
only services to produce a confusing link error complaining about a call
to dev_read_u32_default().

Drop it so that any call to uclass_find_device_by_phandle() is flagged as
an error, making it easier to see what is going on.

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

index f753a1f91e7d4aa456c7a117a8ca1820d0c3f041..117d35ac49c8f6fe43de141be525466460fbabf3 100644 (file)
@@ -394,7 +394,7 @@ done:
        return ret;
 }
 
-#if CONFIG_IS_ENABLED(OF_CONTROL)
+#if CONFIG_IS_ENABLED(OF_CONTROL) && !CONFIG_IS_ENABLED(OF_PLATDATA)
 int uclass_find_device_by_phandle(enum uclass_id id, struct udevice *parent,
                                  const char *name, struct udevice **devp)
 {