Change state of the driver after all tests pass.

Patch is against 2.6.19

Signed-off-by:Milan Svoboda <[EMAIL PROTECTED]>
---
diff -duprN orig/drivers/usb/gadget/inode.c nn/drivers/usb/gadget/inode.c
--- orig/drivers/usb/gadget/inode.c     2006-12-15 08:40:28.000000000 +0000
+++ nn/drivers/usb/gadget/inode.c       2006-12-15 08:40:00.000000000 +0000
@@ -1396,9 +1396,6 @@ gadgetfs_setup (struct usb_gadget *gadge
                struct usb_ep   *ep;
                struct ep_data  *data;
 
-               dev->state = STATE_CONNECTED;
-               dev->dev->bMaxPacketSize0 = gadget->ep0->maxpacket;
-
 #ifdef CONFIG_USB_GADGET_DUALSPEED
                if (gadget->speed == USB_SPEED_HIGH && dev->hs_config == 0) {
                        spin_unlock (&dev->lock);
@@ -1407,6 +1404,9 @@ gadgetfs_setup (struct usb_gadget *gadge
                }
 #endif /* CONFIG_USB_GADGET_DUALSPEED */
 
+               dev->state = STATE_CONNECTED;
+               dev->dev->bMaxPacketSize0 = gadget->ep0->maxpacket;
+
                INFO (dev, "connected\n");
                event = next_event (dev, GADGETFS_CONNECT);
                event->u.speed = gadget->speed;
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
linux-usb-devel@lists.sourceforge.net
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel

Reply via email to