[PATCH 1/6] USB: gadget/u_serial.c: Add comment to gs_buf_free

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

 



It can be called multiple times, so has to be idempotent.
---
 drivers/usb/gadget/u_serial.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/drivers/usb/gadget/u_serial.c b/drivers/usb/gadget/u_serial.c
index d9f7756..85450d3 100644
--- a/drivers/usb/gadget/u_serial.c
+++ b/drivers/usb/gadget/u_serial.c
@@ -159,6 +159,8 @@ static int gs_buf_alloc(struct gs_buf *gb)
  * gs_buf_free
  *
  * Free the buffer and all associated memory.
+ * Must be idempotent; we call this early if possible, and again on
+ * final disconnect.
  */
 static void gs_buf_free(struct gs_buf *gb)
 {
-- 
1.6.3.3

--
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