Print debug message according to zlp direction. Always saying
"Sending" is misleading.

Signed-off-by: Mian Yousaf Kaukab <yousaf.kau...@intel.com>
---
 drivers/usb/dwc2/gadget.c | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/drivers/usb/dwc2/gadget.c b/drivers/usb/dwc2/gadget.c
index 5090300..38ba022 100644
--- a/drivers/usb/dwc2/gadget.c
+++ b/drivers/usb/dwc2/gadget.c
@@ -1335,7 +1335,12 @@ static void s3c_hsotg_program_zlp(struct dwc2_hsotg 
*hsotg,
        u32 epctl_reg = hs_ep->dir_in ? DIEPCTL(index) : DOEPCTL(index);
        u32 epsiz_reg = hs_ep->dir_in ? DIEPTSIZ(index) : DOEPTSIZ(index);
 
-       dev_dbg(hsotg->dev, "Sending zero-length packet on ep%d\n", index);
+       if (hs_ep->dir_in)
+               dev_dbg(hsotg->dev, "Sending zero-length packet on ep%d\n",
+                                                                       index);
+       else
+               dev_dbg(hsotg->dev, "Receiving zero-length packet on ep%d\n",
+                                                                       index);
 
        writel(DXEPTSIZ_MC(1) | DXEPTSIZ_PKTCNT(1) |
                        DXEPTSIZ_XFERSIZE(0), hsotg->regs +
-- 
1.9.1

--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to