usb: gadget: fix: Call usb_gadget_connect() for dummy_udc 34/88034/1
authorKrzysztof Opasiak <k.opasiak@samsung.com>
Mon, 12 Sep 2016 18:54:59 +0000 (20:54 +0200)
committerKrzysztof Opasiak <k.opasiak@samsung.com>
Mon, 12 Sep 2016 20:21:45 +0000 (22:21 +0200)
commit3e956052b234a4e71570083f3658720b03fb0d6a
treec74cce52bcb7871afc5124d45f01928443bcde91
parentf510d3e4ccd7dcb769d11e34f4d0cf0474bbcffc
usb: gadget: fix: Call usb_gadget_connect() for dummy_udc

Ugly hack which comes from Android removes a call
to usb_gadget_connect() in udc_bind_to_driver() to
prevent android/slp gadget from communication before
userspace explicitly enables it.

Mainline gadgets (like g_ffs) expect this function
to be called as they don't have any sysfs interface
to enable them later.

As for usb-host API tests we need to use dummy_hcd
and g_ffs let's call usb_gadget_connect() for all
dummy_udc's.

Change-Id: I782bbb51c54e0b87ff6ef976070b6d8870a1a745
Signed-off-by: Krzysztof Opasiak <k.opasiak@samsung.com>
drivers/usb/gadget/udc-core.c