mirror of
https://xff.cz/git/u-boot/
synced 2025-09-03 09:42:22 +02:00
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:
@@ -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;
|
||||
|
Reference in New Issue
Block a user