dm: core: Access device ofnode through functions

At present ofnode is present in the device even if it is never used. With
of-platdata this field is not used, so can be removed. In preparation for
this, change the access to go through inline functions.

Signed-off-by: Simon Glass <sjg@chromium.org>
This commit is contained in:
Simon Glass 2020-12-19 10:40:14 -07:00
parent 7d14ee443c
commit f10643cf8a
50 changed files with 113 additions and 82 deletions

View file

@ -110,7 +110,7 @@ static int cdns3_core_init_role(struct cdns3 *cdns)
enum usb_dr_mode dr_mode;
int ret = 0;
dr_mode = usb_get_dr_mode(dev->node);
dr_mode = usb_get_dr_mode(dev_ofnode(dev));
cdns->role = USB_ROLE_NONE;
/*
@ -393,7 +393,7 @@ int cdns3_bind(struct udevice *parent)
ofnode node;
int ret;
node = ofnode_by_compatible(parent->node, "cdns,usb3");
node = ofnode_by_compatible(dev_ofnode(parent), "cdns,usb3");
if (!ofnode_valid(node)) {
ret = -ENODEV;
goto fail;