From e4c1b1ba7f663fd77204201eef83baf58e2e5777 Mon Sep 17 00:00:00 2001
From: Robert Baldyga <r.baldyga@samsung.com>
Date: Fri, 21 Aug 2015 11:01:29 +0200
Subject: [PATCH] usb: gadget: fix possible regression introduced with
 ep->claimed

This patch fixes possible regression introduced by
patch reworking endpoint claiming mechanism. It restores
setring ep->driver_data to NULL in usb_ep_autoconfig_reset(),
which was removed by patch commit cc476b42a39d.

Fixes: cc476b42a39d ("usb: gadget: encapsulate endpoint
	claiming mechanism")
Reported-by: Felipe Balbi <balbi@ti.com>
Signed-off-by: Robert Baldyga <r.baldyga@samsung.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
---
 drivers/usb/gadget/epautoconf.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/usb/gadget/epautoconf.c b/drivers/usb/gadget/epautoconf.c
index 978435a510387..6399c106a3a55 100644
--- a/drivers/usb/gadget/epautoconf.c
+++ b/drivers/usb/gadget/epautoconf.c
@@ -186,6 +186,7 @@ void usb_ep_autoconfig_reset (struct usb_gadget *gadget)
 
 	list_for_each_entry (ep, &gadget->ep_list, ep_list) {
 		ep->claimed = false;
+		ep->driver_data = NULL;
 	}
 	gadget->in_epnum = 0;
 	gadget->out_epnum = 0;
-- 
GitLab