usb: cdns3: Fix not calling dev_xxx with a device
authorSean Anderson <seanga2@gmail.com>
Tue, 15 Sep 2020 14:45:14 +0000 (10:45 -0400)
committerTom Rini <trini@konsulko.com>
Wed, 30 Sep 2020 12:53:51 +0000 (08:53 -0400)
ep0.c also need to include dm.h so dev_xxx can access udevice fields.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>
drivers/usb/cdns3/ep0.c
drivers/usb/cdns3/gadget.c

index a08c6945590f292e87f4ff71d2ccc1518ae3df44..acff79ae1ca1cf9faa4109b3752de5285aacacdd 100644 (file)
@@ -11,8 +11,9 @@
  */
 
 #include <cpu_func.h>
-#include <asm/cache.h>
+#include <dm.h>
 #include <dm/device_compat.h>
+#include <asm/cache.h>
 #include <linux/bitops.h>
 #include <linux/delay.h>
 #include <linux/usb/composite.h>
@@ -810,7 +811,7 @@ int cdns3_gadget_ep_set_wedge(struct usb_ep *ep)
 {
        struct cdns3_endpoint *priv_ep = ep_to_cdns3_ep(ep);
 
-       dev_dbg(priv_dev->dev, "Wedge for %s\n", ep->name);
+       dev_dbg(priv_ep->cdns3_dev->dev, "Wedge for %s\n", ep->name);
        cdns3_gadget_ep_set_halt(ep, 1);
        priv_ep->flags |= EP_WEDGE;
 
index 8f81d17ec8e34f9d44903c1e8b4d1c02483db218..83dbb5a103d2ec65e07685248bbc24ce9f94080d 100644 (file)
@@ -2399,8 +2399,7 @@ static void cdns3_gadget_udc_set_speed(struct usb_gadget *gadget,
        case USB_SPEED_SUPER:
                break;
        default:
-               dev_err(cdns->dev, "invalid speed parameter %d\n",
-                       speed);
+               dev_err(priv_dev->dev, "invalid speed parameter %d\n", speed);
        }
 
        priv_dev->gadget.speed = speed;