From df8395a01fa7a15cd82aa4571b56213bfa131779 Mon Sep 17 00:00:00 2001 From: Sean Anderson Date: Tue, 15 Sep 2020 10:45:14 -0400 Subject: [PATCH] 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 --- drivers/usb/cdns3/ep0.c | 5 +++-- drivers/usb/cdns3/gadget.c | 3 +-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/usb/cdns3/ep0.c b/drivers/usb/cdns3/ep0.c index a08c6945..acff79a 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 8f81d17..83dbb5a 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; -- 2.7.4