usb: dwc2: gadget: remove hardcoded if (0) and if (1) checks
authorMian Yousaf Kaukab <yousaf.kaukab@intel.com>
Fri, 30 Jan 2015 08:09:30 +0000 (09:09 +0100)
committerFelipe Balbi <balbi@ti.com>
Fri, 30 Jan 2015 16:30:55 +0000 (10:30 -0600)
Remove dead code as well.

Tested-by: Robert Baldyga <r.baldyga@samsung.com>
Acked-by: John Youn <johnyoun@synopsys.com>
Signed-off-by: Mian Yousaf Kaukab <yousaf.kaukab@intel.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
drivers/usb/dwc2/gadget.c

index aa5c0ba5ed133ada0be00764568f28a03d2697a0..fc9462aff67f72f6381f6e7ce38289374b346308 100644 (file)
@@ -566,11 +566,6 @@ static void s3c_hsotg_start_req(struct dwc2_hsotg *hsotg,
        length = ureq->length - ureq->actual;
        dev_dbg(hsotg->dev, "ureq->length:%d ureq->actual:%d\n",
                ureq->length, ureq->actual);
-       if (0)
-               dev_dbg(hsotg->dev,
-                       "REQ buf %p len %d dma %pad noi=%d zp=%d snok=%d\n",
-                       ureq->buf, length, &ureq->dma,
-                       ureq->no_interrupt, ureq->zero, ureq->short_not_ok);
 
        maxreq = get_ep_limit(hs_ep);
        if (length > maxreq) {
@@ -1566,8 +1561,7 @@ static void s3c_hsotg_handle_rx(struct dwc2_hsotg *hsotg)
        size = grxstsr & GRXSTS_BYTECNT_MASK;
        size >>= GRXSTS_BYTECNT_SHIFT;
 
-       if (1)
-               dev_dbg(hsotg->dev, "%s: GRXSTSP=0x%08x (%d@%d)\n",
+       dev_dbg(hsotg->dev, "%s: GRXSTSP=0x%08x (%d@%d)\n",
                        __func__, grxstsr, size, epnum);
 
        switch ((status & GRXSTS_PKTSTS_MASK) >> GRXSTS_PKTSTS_SHIFT) {
@@ -2926,12 +2920,6 @@ static void s3c_hsotg_init(struct dwc2_hsotg *hsotg)
        /* Be in disconnected state until gadget is registered */
        __orr32(hsotg->regs + DCTL, DCTL_SFTDISCON);
 
-       if (0) {
-               /* post global nak until we're ready */
-               writel(DCTL_SGNPINNAK | DCTL_SGOUTNAK,
-                      hsotg->regs + DCTL);
-       }
-
        /* setup fifos */
 
        dev_dbg(hsotg->dev, "GRXFSIZ=0x%08x, GNPTXFSIZ=0x%08x\n",