aboutsummaryrefslogtreecommitdiff
path: root/drivers/usb/gadget/dwc2_udc_otg.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/usb/gadget/dwc2_udc_otg.c')
-rw-r--r--drivers/usb/gadget/dwc2_udc_otg.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/usb/gadget/dwc2_udc_otg.c b/drivers/usb/gadget/dwc2_udc_otg.c
index 4771b1e9312..e3871e381e1 100644
--- a/drivers/usb/gadget/dwc2_udc_otg.c
+++ b/drivers/usb/gadget/dwc2_udc_otg.c
@@ -987,8 +987,8 @@ static int dwc2_udc_otg_of_to_plat(struct udevice *dev)
void (*set_params)(struct dwc2_plat_otg_data *data);
int ret;
- if (usb_get_dr_mode(dev->node) != USB_DR_MODE_PERIPHERAL &&
- usb_get_dr_mode(dev->node) != USB_DR_MODE_OTG) {
+ if (usb_get_dr_mode(dev_ofnode(dev)) != USB_DR_MODE_PERIPHERAL &&
+ usb_get_dr_mode(dev_ofnode(dev)) != USB_DR_MODE_OTG) {
dev_dbg(dev, "Invalid mode\n");
return -ENODEV;
}