usb: s3c-otg: Rename s3c_udc_*() functions

The driver is actually for the Designware DWC2 controller.
This patch renames the s3c_ep_*() functions to reflect this.
The function s3c_udc_probe() is a special case and is not
renamed by this patch yet.

Signed-off-by: Marek Vasut <marex@denx.de>
diff --git a/drivers/usb/gadget/s3c_udc_otg.c b/drivers/usb/gadget/s3c_udc_otg.c
index 0b75f26..4cf82e2 100644
--- a/drivers/usb/gadget/s3c_udc_otg.c
+++ b/drivers/usb/gadget/s3c_udc_otg.c
@@ -108,8 +108,8 @@
 static void reconfig_usbd(struct dwc2_udc *dev);
 static void set_max_pktsize(struct dwc2_udc *dev, enum usb_device_speed speed);
 static void nuke(struct dwc2_ep *ep, int status);
-static int s3c_udc_set_halt(struct usb_ep *_ep, int value);
-static void s3c_udc_set_nak(struct dwc2_ep *ep);
+static int dwc2_udc_set_halt(struct usb_ep *_ep, int value);
+static void dwc2_udc_set_nak(struct dwc2_ep *ep);
 
 void set_udc_gadget_private_data(void *p)
 {
@@ -134,7 +134,7 @@
 	.queue = s3c_queue,
 	.dequeue = s3c_dequeue,
 
-	.set_halt = s3c_udc_set_halt,
+	.set_halt = dwc2_udc_set_halt,
 	.fifo_status = s3c_fifo_status,
 	.fifo_flush = s3c_fifo_flush,
 };
@@ -578,11 +578,11 @@
 	ep->ep.maxpacket = le16_to_cpu(get_unaligned(&desc->wMaxPacketSize));
 
 	/* Reset halt state */
-	s3c_udc_set_nak(ep);
-	s3c_udc_set_halt(_ep, 0);
+	dwc2_udc_set_nak(ep);
+	dwc2_udc_set_halt(_ep, 0);
 
 	spin_lock_irqsave(&ep->dev->lock, flags);
-	s3c_udc_ep_activate(ep);
+	dwc2_udc_ep_activate(ep);
 	spin_unlock_irqrestore(&ep->dev->lock, flags);
 
 	debug("%s: enabled %s, stopped = %d, maxpacket = %d\n",
@@ -719,14 +719,14 @@
 	debug("%s: %d\n", __func__, ep_index(ep));
 }
 
-static const struct usb_gadget_ops s3c_udc_ops = {
+static const struct usb_gadget_ops dwc2_udc_ops = {
 	/* current versions must always be self-powered */
 };
 
 static struct dwc2_udc memory = {
 	.usb_address = 0,
 	.gadget = {
-		.ops = &s3c_udc_ops,
+		.ops = &dwc2_udc_ops,
 		.ep0 = &memory.ep[0].ep,
 		.name = driver_name,
 	},
@@ -840,6 +840,6 @@
 	u32 gintmsk = readl(&reg->gintmsk);
 
 	if (intr_status & gintmsk)
-		return s3c_udc_irq(1, (void *)the_controller);
+		return dwc2_udc_irq(1, (void *)the_controller);
 	return 0;
 }
diff --git a/drivers/usb/gadget/s3c_udc_otg_xfer_dma.c b/drivers/usb/gadget/s3c_udc_otg_xfer_dma.c
index aa50639..e93d602 100644
--- a/drivers/usb/gadget/s3c_udc_otg_xfer_dma.c
+++ b/drivers/usb/gadget/s3c_udc_otg_xfer_dma.c
@@ -25,7 +25,7 @@
 #define GET_MAX_LUN_REQUEST	0xFE
 #define BOT_RESET_REQUEST	0xFF
 
-static inline void s3c_udc_ep0_zlp(struct dwc2_udc *dev)
+static inline void dwc2_udc_ep0_zlp(struct dwc2_udc *dev)
 {
 	u32 ep_ctrl;
 
@@ -41,7 +41,7 @@
 	dev->ep0state = WAIT_FOR_IN_COMPLETE;
 }
 
-static void s3c_udc_pre_setup(void)
+static void dwc2_udc_pre_setup(void)
 {
 	u32 ep_ctrl;
 
@@ -240,7 +240,7 @@
 	if (is_short || req->req.actual == req->req.length) {
 		if (ep_num == EP0_CON && dev->ep0state == DATA_STATE_RECV) {
 			debug_cond(DEBUG_OUT_EP != 0, "	=> Send ZLP\n");
-			s3c_udc_ep0_zlp(dev);
+			dwc2_udc_ep0_zlp(dev);
 			/* packet will be completed in complete_tx() */
 			dev->ep0state = WAIT_FOR_IN_COMPLETE;
 		} else {
@@ -335,7 +335,7 @@
 	}
 }
 
-static inline void s3c_udc_check_tx_queue(struct dwc2_udc *dev, u8 ep_num)
+static inline void dwc2_udc_check_tx_queue(struct dwc2_udc *dev, u8 ep_num)
 {
 	struct dwc2_ep *ep = &dev->ep[ep_num];
 	struct dwc2_request *req;
@@ -392,12 +392,12 @@
 						dev->ep0state = WAIT_FOR_SETUP;
 
 					if (dev->ep0state == WAIT_FOR_SETUP)
-						s3c_udc_pre_setup();
+						dwc2_udc_pre_setup();
 
 					/* continue transfer after
 					   set_clear_halt for DMA mode */
 					if (clear_feature_flag == 1) {
-						s3c_udc_check_tx_queue(dev,
+						dwc2_udc_check_tx_queue(dev,
 							clear_feature_num);
 						clear_feature_flag = 0;
 					}
@@ -438,7 +438,7 @@
 						complete_rx(dev, ep_num);
 					else {
 						dev->ep0state = WAIT_FOR_SETUP;
-						s3c_udc_pre_setup();
+						dwc2_udc_pre_setup();
 					}
 				}
 
@@ -461,7 +461,7 @@
 /*
  *	usb client interrupt handler.
  */
-static int s3c_udc_irq(int irq, void *_dev)
+static int dwc2_udc_irq(int irq, void *_dev)
 {
 	struct dwc2_udc *dev = _dev;
 	u32 intr_status;
@@ -554,7 +554,7 @@
 				reconfig_usbd(dev);
 				dev->ep0state = WAIT_FOR_SETUP;
 				reset_available = 0;
-				s3c_udc_pre_setup();
+				dwc2_udc_pre_setup();
 			} else
 				reset_available = 1;
 
@@ -742,7 +742,7 @@
 	u32 ctrl = readl(&reg->dcfg);
 	writel(DEVICE_ADDRESS(address) | ctrl, &reg->dcfg);
 
-	s3c_udc_ep0_zlp(dev);
+	dwc2_udc_ep0_zlp(dev);
 
 	debug_cond(DEBUG_EP0 != 0,
 		   "%s: USB OTG 2.0 Device address=%d, DCFG=0x%x\n",
@@ -751,7 +751,7 @@
 	dev->usb_address = address;
 }
 
-static inline void s3c_udc_ep0_set_stall(struct dwc2_ep *ep)
+static inline void dwc2_udc_ep0_set_stall(struct dwc2_ep *ep)
 {
 	struct dwc2_udc *dev;
 	u32		ep_ctrl = 0;
@@ -776,7 +776,7 @@
 	 */
 	dev->ep0state = WAIT_FOR_SETUP;
 
-	s3c_udc_pre_setup();
+	dwc2_udc_pre_setup();
 }
 
 static void dwc2_ep0_read(struct dwc2_udc *dev)
@@ -802,7 +802,7 @@
 		 * or Bulk-Only mass storge reset */
 
 		ep->len = 0;
-		s3c_udc_ep0_zlp(dev);
+		dwc2_udc_ep0_zlp(dev);
 
 		debug_cond(DEBUG_EP0 != 0,
 			   "%s: req.length = 0, bRequest = %d\n",
@@ -859,7 +859,7 @@
 	return 1;
 }
 
-static int s3c_udc_get_status(struct dwc2_udc *dev,
+static int dwc2_udc_get_status(struct dwc2_udc *dev,
 		struct usb_ctrlrequest *crq)
 {
 	u8 ep_num = crq->wIndex & 0x7F;
@@ -920,7 +920,7 @@
 	return 0;
 }
 
-static void s3c_udc_set_nak(struct dwc2_ep *ep)
+static void dwc2_udc_set_nak(struct dwc2_ep *ep)
 {
 	u8		ep_num;
 	u32		ep_ctrl = 0;
@@ -946,7 +946,7 @@
 }
 
 
-static void s3c_udc_ep_set_stall(struct dwc2_ep *ep)
+static void dwc2_udc_ep_set_stall(struct dwc2_ep *ep)
 {
 	u8		ep_num;
 	u32		ep_ctrl = 0;
@@ -981,7 +981,7 @@
 	return;
 }
 
-static void s3c_udc_ep_clear_stall(struct dwc2_ep *ep)
+static void dwc2_udc_ep_clear_stall(struct dwc2_ep *ep)
 {
 	u8		ep_num;
 	u32		ep_ctrl = 0;
@@ -1029,7 +1029,7 @@
 	return;
 }
 
-static int s3c_udc_set_halt(struct usb_ep *_ep, int value)
+static int dwc2_udc_set_halt(struct usb_ep *_ep, int value)
 {
 	struct dwc2_ep	*ep;
 	struct dwc2_udc	*dev;
@@ -1062,13 +1062,13 @@
 
 	if (value == 0) {
 		ep->stopped = 0;
-		s3c_udc_ep_clear_stall(ep);
+		dwc2_udc_ep_clear_stall(ep);
 	} else {
 		if (ep_num == 0)
 			dev->ep0state = WAIT_FOR_SETUP;
 
 		ep->stopped = 1;
-		s3c_udc_ep_set_stall(ep);
+		dwc2_udc_ep_set_stall(ep);
 	}
 
 	spin_unlock_irqrestore(&dev->lock, flags);
@@ -1076,7 +1076,7 @@
 	return 0;
 }
 
-static void s3c_udc_ep_activate(struct dwc2_ep *ep)
+static void dwc2_udc_ep_activate(struct dwc2_ep *ep)
 {
 	u8 ep_num;
 	u32 ep_ctrl = 0, daintmsk = 0;
@@ -1123,7 +1123,7 @@
 
 }
 
-static int s3c_udc_clear_feature(struct usb_ep *_ep)
+static int dwc2_udc_clear_feature(struct usb_ep *_ep)
 {
 	struct dwc2_udc	*dev;
 	struct dwc2_ep	*ep;
@@ -1158,7 +1158,7 @@
 			break;
 		}
 
-		s3c_udc_ep0_zlp(dev);
+		dwc2_udc_ep0_zlp(dev);
 		break;
 
 	case USB_RECIP_ENDPOINT:
@@ -1168,14 +1168,14 @@
 
 		if (usb_ctrl->wValue == USB_ENDPOINT_HALT) {
 			if (ep_num == 0) {
-				s3c_udc_ep0_set_stall(ep);
+				dwc2_udc_ep0_set_stall(ep);
 				return 0;
 			}
 
-			s3c_udc_ep0_zlp(dev);
+			dwc2_udc_ep0_zlp(dev);
 
-			s3c_udc_ep_clear_stall(ep);
-			s3c_udc_ep_activate(ep);
+			dwc2_udc_ep_clear_stall(ep);
+			dwc2_udc_ep_activate(ep);
 			ep->stopped = 0;
 
 			clear_feature_num = ep_num;
@@ -1187,7 +1187,7 @@
 	return 0;
 }
 
-static int s3c_udc_set_feature(struct usb_ep *_ep)
+static int dwc2_udc_set_feature(struct usb_ep *_ep)
 {
 	struct dwc2_udc	*dev;
 	struct dwc2_ep	*ep;
@@ -1232,7 +1232,7 @@
 			break;
 		}
 
-		s3c_udc_ep0_zlp(dev);
+		dwc2_udc_ep0_zlp(dev);
 		return 0;
 
 	case USB_RECIP_INTERFACE:
@@ -1245,14 +1245,14 @@
 			   "\tSET_FEATURE: USB_RECIP_ENDPOINT\n");
 		if (usb_ctrl->wValue == USB_ENDPOINT_HALT) {
 			if (ep_num == 0) {
-				s3c_udc_ep0_set_stall(ep);
+				dwc2_udc_ep0_set_stall(ep);
 				return 0;
 			}
 			ep->stopped = 1;
-			s3c_udc_ep_set_stall(ep);
+			dwc2_udc_ep_set_stall(ep);
 		}
 
-		s3c_udc_ep0_zlp(dev);
+		dwc2_udc_ep0_zlp(dev);
 		return 0;
 	}
 
@@ -1306,7 +1306,7 @@
 			   "wLength = %d, setup returned\n",
 			   usb_ctrl->wLength);
 
-		s3c_udc_ep0_set_stall(ep);
+		dwc2_udc_ep0_set_stall(ep);
 		dev->ep0state = WAIT_FOR_SETUP;
 
 		return;
@@ -1317,7 +1317,7 @@
 			   "%s:BOT Rest:invalid wLength =%d, setup returned\n",
 			   __func__, usb_ctrl->wLength);
 
-		s3c_udc_ep0_set_stall(ep);
+		dwc2_udc_ep0_set_stall(ep);
 		dev->ep0state = WAIT_FOR_SETUP;
 
 		return;
@@ -1384,7 +1384,7 @@
 			break;
 
 		case USB_REQ_GET_STATUS:
-			if (!s3c_udc_get_status(dev, usb_ctrl))
+			if (!dwc2_udc_get_status(dev, usb_ctrl))
 				return;
 
 			break;
@@ -1392,7 +1392,7 @@
 		case USB_REQ_CLEAR_FEATURE:
 			ep_num = usb_ctrl->wIndex & 0x7f;
 
-			if (!s3c_udc_clear_feature(&dev->ep[ep_num].ep))
+			if (!dwc2_udc_clear_feature(&dev->ep[ep_num].ep))
 				return;
 
 			break;
@@ -1400,7 +1400,7 @@
 		case USB_REQ_SET_FEATURE:
 			ep_num = usb_ctrl->wIndex & 0x7f;
 
-			if (!s3c_udc_set_feature(&dev->ep[ep_num].ep))
+			if (!dwc2_udc_set_feature(&dev->ep[ep_num].ep))
 				return;
 
 			break;
@@ -1427,7 +1427,7 @@
 
 		if (i < 0) {
 			/* setup processing failed, force stall */
-			s3c_udc_ep0_set_stall(ep);
+			dwc2_udc_ep0_set_stall(ep);
 			dev->ep0state = WAIT_FOR_SETUP;
 
 			debug_cond(DEBUG_SETUP != 0,