From: Roger Quadros Date: Fri, 29 May 2015 14:01:50 +0000 (+0300) Subject: usb: xhci: Fix suspend/resume when used with OTG core X-Git-Tag: omap-for-v4.3/legacy-v2-signed~119^2~27 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=9fa733f24bb54dd532b5f5d7abc275c4a547c69f;p=pandora-kernel.git usb: xhci: Fix suspend/resume when used with OTG core In the OTG case, the controller might not yet have been added or is removed before the system suspends. Assign xhci->main_hcd during probe to prevent NULL pointer de-reference in xhci_suspend/resume(). Use the hcd->state flag to check if HCD is halted and if that is so do nothing for xhci_suspend/resume(). [Only for xhci-plat devices, pci devices need it in gen_setup -Mathias] Signed-off-by: Roger Quadros Signed-off-by: Mathias Nyman Signed-off-by: Greg Kroah-Hartman --- Reading git-diff-tree failed