diff options
| author | Simon Glass <sjg@chromium.org> | 2017-05-18 20:09:12 -0600 | 
|---|---|---|
| committer | Simon Glass <sjg@chromium.org> | 2017-06-01 07:03:09 -0600 | 
| commit | a40cc8e12352ee35d095d29125fedd2eb2821228 (patch) | |
| tree | 9378091703a39210a9ed34d827b7fa621ef2f432 /drivers/core/uclass.c | |
| parent | 7a993bbcf2664d06e59b5b61f9889737e10529fc (diff) | |
dm: core: Update uclass_find_device_by_phandle() for livetree
Adjust this function to work with livetree.
Signed-off-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'drivers/core/uclass.c')
| -rw-r--r-- | drivers/core/uclass.c | 5 | 
1 files changed, 2 insertions, 3 deletions
| diff --git a/drivers/core/uclass.c b/drivers/core/uclass.c index 630b2e73368..21dc696da35 100644 --- a/drivers/core/uclass.c +++ b/drivers/core/uclass.c @@ -324,8 +324,7 @@ static int uclass_find_device_by_phandle(enum uclass_id id,  	int ret;  	*devp = NULL; -	find_phandle = fdtdec_get_int(gd->fdt_blob, dev_of_offset(parent), name, -				      -1); +	find_phandle = dev_read_u32_default(parent, name, -1);  	if (find_phandle <= 0)  		return -ENOENT;  	ret = uclass_get(id, &uc); @@ -335,7 +334,7 @@ static int uclass_find_device_by_phandle(enum uclass_id id,  	list_for_each_entry(dev, &uc->dev_head, uclass_node) {  		uint phandle; -		phandle = fdt_get_phandle(gd->fdt_blob, dev_of_offset(dev)); +		phandle = dev_read_phandle(dev);  		if (phandle == find_phandle) {  			*devp = dev; | 
