usb: diag: Fix endpoint configuration when multiple instances are used

Call ep_choose() with the saved copies of the endpoint descriptors
rather than the static descriptors since they can be modified if
usb_ep_autoconfig() is called more than once when supporting multiple
diag channels. Print the endpoint names in debugfs to aid in debugging.
Also fix diag bind sequence in Android composite driver to make sure
update_pid_and_serial_num is called only on the first diag instance.

Change-Id: I39c3fc0f2fde5fe2954e24b25726fa849f5f0e62
Signed-off-by: Jack Pham <jackp@codeaurora.org>
diff --git a/drivers/usb/gadget/android.c b/drivers/usb/gadget/android.c
index af6f351..047df1a 100644
--- a/drivers/usb/gadget/android.c
+++ b/drivers/usb/gadget/android.c
@@ -373,12 +373,13 @@
 	char *name;
 	char buf[32], *b;
 	int once = 0, err = -1;
-	int (*notify)(uint32_t, const char *) = NULL;
+	int (*notify)(uint32_t, const char *);
 
 	strlcpy(buf, diag_clients, sizeof(buf));
 	b = strim(buf);
 
 	while (b) {
+		notify = NULL;
 		name = strsep(&b, ",");
 		/* Allow only first diag channel to update pid and serial no */
 		if (_android_dev->pdata && !once++)