LOCAL / usb: gadget: change gadget connect order
authorJaewon Kim <jaewon02.kim@samsung.com>
Thu, 26 Feb 2015 07:38:13 +0000 (16:38 +0900)
committerJaehoon Chung <jh80.chung@samsung.com>
Tue, 29 Jan 2019 02:25:22 +0000 (11:25 +0900)
This patch changes usb_gadget_connect() order before add config.

Signed-off-by: Jaewon Kim <jaewon02.kim@samsung.com>
drivers/usb/gadget/legacy/slp.c

index 48316a6..9d6b5de 100644 (file)
@@ -175,14 +175,14 @@ static void slp_multi_enable(struct slp_multi_dev *dev)
                return;
 
        if (--dev->disable_depth == 0) {
+               usb_gadget_connect(cdev->gadget);
+
                if (!dev->dual_config)
                        usb_add_config(cdev, &first_config_driver,
                                        slp_multi_bind_config);
                else
                        usb_add_config(cdev, &second_config_driver,
                                        slp_multi_bind_config);
-
-               usb_gadget_connect(cdev->gadget);
        }
 }