diff options
author | Simon Glass <sjg@chromium.org> | 2015-12-20 02:38:55 (GMT) |
---|---|---|
committer | Simon Glass <sjg@chromium.org> | 2016-01-21 02:06:21 (GMT) |
commit | c275dfefebb95c1ffdca630a65055a850b83adc7 (patch) | |
tree | e7d68acaca87c258a859ea2cf6ec275335ddd74b /drivers/core/uclass.c | |
parent | 57e5ecaf755d5301cd33683788e4b8432938bbbe (diff) | |
download | u-boot-c275dfefebb95c1ffdca630a65055a850b83adc7.tar.xz |
dm: core: Provide uclass_find_device_by_phandle() only when needed
This function cannot be used unless support is enabled for device tree
control. Adjust the code to reflect that.
Signed-off-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'drivers/core/uclass.c')
-rw-r--r-- | drivers/core/uclass.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/core/uclass.c b/drivers/core/uclass.c index 1af0947..36bcf19 100644 --- a/drivers/core/uclass.c +++ b/drivers/core/uclass.c @@ -278,6 +278,7 @@ static int uclass_find_device_by_of_offset(enum uclass_id id, int node, return -ENODEV; } +#if CONFIG_IS_ENABLED(OF_CONTROL) static int uclass_find_device_by_phandle(enum uclass_id id, struct udevice *parent, const char *name, @@ -308,6 +309,7 @@ static int uclass_find_device_by_phandle(enum uclass_id id, return -ENODEV; } +#endif int uclass_get_device_tail(struct udevice *dev, int ret, struct udevice **devp) @@ -374,6 +376,7 @@ int uclass_get_device_by_of_offset(enum uclass_id id, int node, return uclass_get_device_tail(dev, ret, devp); } +#if CONFIG_IS_ENABLED(OF_CONTROL) int uclass_get_device_by_phandle(enum uclass_id id, struct udevice *parent, const char *name, struct udevice **devp) { @@ -384,6 +387,7 @@ int uclass_get_device_by_phandle(enum uclass_id id, struct udevice *parent, ret = uclass_find_device_by_phandle(id, parent, name, &dev); return uclass_get_device_tail(dev, ret, devp); } +#endif int uclass_first_device(enum uclass_id id, struct udevice **devp) { |