From: Sean Anderson Date: Tue, 15 Sep 2020 14:45:14 +0000 (-0400) Subject: usb: cdns3: Fix not calling dev_xxx with a device X-Git-Url: http://git.dujemihanovic.xyz/img/static/gitweb.css?a=commitdiff_plain;h=df8395a01fa7a15cd82aa4571b56213bfa131779;p=u-boot.git usb: cdns3: Fix not calling dev_xxx with a device ep0.c also need to include dm.h so dev_xxx can access udevice fields. Signed-off-by: Sean Anderson Tested-by: Patrick Delaunay --- diff --git a/drivers/usb/cdns3/ep0.c b/drivers/usb/cdns3/ep0.c index a08c694559..acff79ae1c 100644 --- a/drivers/usb/cdns3/ep0.c +++ b/drivers/usb/cdns3/ep0.c @@ -11,8 +11,9 @@ */ #include -#include +#include #include +#include #include #include #include @@ -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; diff --git a/drivers/usb/cdns3/gadget.c b/drivers/usb/cdns3/gadget.c index 8f81d17ec8..83dbb5a103 100644 --- a/drivers/usb/cdns3/gadget.c +++ b/drivers/usb/cdns3/gadget.c @@ -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;