[PATCH v4 38/43] usb: gadget: u_serial: remove usb_ep_enable()/usb_ep_disable()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



As we have automatic endpoint state handling it's no longer needed.

Signed-off-by: Robert Baldyga <r.baldyga@xxxxxxxxxxx>
---
 drivers/usb/gadget/function/u_serial.c | 16 ----------------
 1 file changed, 16 deletions(-)

diff --git a/drivers/usb/gadget/function/u_serial.c b/drivers/usb/gadget/function/u_serial.c
index 6af145f..73abdd9 100644
--- a/drivers/usb/gadget/function/u_serial.c
+++ b/drivers/usb/gadget/function/u_serial.c
@@ -1439,15 +1439,7 @@ int gserial_connect(struct gserial *gser, u8 port_num)
 		return -EBUSY;
 	}
 
-	/* activate the endpoints */
-	status = usb_ep_enable(gser->in);
-	if (status < 0)
-		return status;
 	gser->in->driver_data = port;
-
-	status = usb_ep_enable(gser->out);
-	if (status < 0)
-		goto fail_out;
 	gser->out->driver_data = port;
 
 	/* then tell the tty glue that I/O can work */
@@ -1479,10 +1471,6 @@ int gserial_connect(struct gserial *gser, u8 port_num)
 	spin_unlock_irqrestore(&port->port_lock, flags);
 
 	return status;
-
-fail_out:
-	usb_ep_disable(gser->in);
-	return status;
 }
 EXPORT_SYMBOL_GPL(gserial_connect);
 /**
@@ -1519,10 +1507,6 @@ void gserial_disconnect(struct gserial *gser)
 	}
 	spin_unlock_irqrestore(&port->port_lock, flags);
 
-	/* disable endpoints, aborting down any active I/O */
-	usb_ep_disable(gser->out);
-	usb_ep_disable(gser->in);
-
 	/* finally, free any unused/unusable I/O buffers */
 	spin_lock_irqsave(&port->port_lock, flags);
 	if (port->port.count == 0 && !port->openclose)
-- 
1.9.1

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



[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux