usb: dwc2: gadget: Only initialize device if in device mode
authorJohn Youn <johnyoun@synopsys.com>
Thu, 8 Sep 2016 02:39:37 +0000 (19:39 -0700)
committerFelipe Balbi <felipe.balbi@linux.intel.com>
Thu, 8 Sep 2016 11:02:50 +0000 (14:02 +0300)
commitd0f0ac56b34b28e80223d7086b4decdf027c27ed
treeb7a473dd88722a65bcf5b44fb08177c370ea5497
parent3262ad824307c275922161e82c2db1458822f28c
usb: dwc2: gadget: Only initialize device if in device mode

In dwc2_hsotg_udc_start(), don't initialize the controller for device
mode unless we are actually in device mode.

Tested-by: Heiko Stuebner <heiko@sntech.de>
Tested-by: Stefan Wahren <stefan.wahren@i2se.com>
Signed-off-by: John Youn <johnyoun@synopsys.com>
Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
drivers/usb/dwc2/gadget.c