usb: chipidea: otg initialization is only needed when the gadget is supported
authorPeter Chen <peter.chen@freescale.com>
Mon, 22 Sep 2014 00:14:16 +0000 (08:14 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 24 Sep 2014 04:32:31 +0000 (21:32 -0700)
We have only needed to enable otg initialization when both of
below conditions are satisfied:

- The controller is otg capable
- The gadget function is enabled

If the controller is otg capable, but is host-only configuration, we do
not need to access register otgsc and do any otg operations (eg, create
otg workqueue).

Signed-off-by: Peter Chen <peter.chen@freescale.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/usb/chipidea/core.c

Simple merge