diff options
author | Fabio Estevam | 2023-10-09 10:15:34 -0300 |
---|---|---|
committer | Stefano Babic | 2023-10-16 08:46:01 +0200 |
commit | 2bcfae22d9f61a57f9cb8f2eb0aff79259e2c724 (patch) | |
tree | bd1423070a15c2f3ed34de76cd46db20640bbbde | |
parent | 7dede4033bd0391d240914b3e54ec49a984d39b2 (diff) |
usb: ehci: mxs: Fix the USB node pointer retrieval
Use dev_ofnode() to retrieve the USB node pointer from the udevice
structure.
This fixes the following build error:
drivers/usb/host/ehci-mxs.c:143:38: error: 'struct udevice' has no member named 'node_'
Signed-off-by: Fabio Estevam <festevam@denx.de>
Reviewed-by: Marek Vasut <marex@denx.de>
-rw-r--r-- | drivers/usb/host/ehci-mxs.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/drivers/usb/host/ehci-mxs.c b/drivers/usb/host/ehci-mxs.c index 147b2fa145d..092c79fd4bc 100644 --- a/drivers/usb/host/ehci-mxs.c +++ b/drivers/usb/host/ehci-mxs.c @@ -136,11 +136,12 @@ static int ehci_usb_ofdata_to_platdata(struct udevice *dev) struct usb_plat *plat = dev_get_plat(dev); struct ehci_mxs_port *port = &priv->port; u32 phandle, phy_reg, clk_reg, clk_id; + ofnode np = dev_ofnode(dev); ofnode phy_node, clk_node; const char *mode; int ret; - mode = ofnode_read_string(dev->node_, "dr_mode"); + mode = ofnode_read_string(np, "dr_mode"); if (mode) { if (strcmp(mode, "peripheral") == 0) plat->init_type = USB_INIT_DEVICE; @@ -151,12 +152,12 @@ static int ehci_usb_ofdata_to_platdata(struct udevice *dev) } /* Read base address of the USB IP block */ - ret = ofnode_read_u32(dev->node_, "reg", &port->usb_regs); + ret = ofnode_read_u32(np, "reg", &port->usb_regs); if (ret) return ret; /* Read base address of the USB PHY IP block */ - ret = ofnode_read_u32(dev->node_, "fsl,usbphy", &phandle); + ret = ofnode_read_u32(np, "fsl,usbphy", &phandle); if (ret) return ret; |