usb: ehci-msm-hsic: fix runtime suspend when IPA not used

Commit aa165c5ce19e06d23b70b2829d555a3a4a09b4cc "ehci: hsic: add
suspend/resume handshake with ipa resource manager" introduced a
bug in which the controller does not enter runtime suspend even
though all its child devices are suspended. This was caused by
an errant call to pm_runtime_get() by the usb_bam driver, which
unless the "consider_ipa_handshake" feature is enabled, has no
other means to decrement the PM counter until the driver's
remove() is called.

As the usb_bam interaction is only used in the case of the new
"consider_ipa_handshake" flag, fix the problem by only calling
msm_bam_set_hsic_host() if the flag is set.

Change-Id: I175ef08118d40d1ccb4b3192fb070701ea80060c
Signed-off-by: Jack Pham <jackp@codeaurora.org>
diff --git a/drivers/usb/host/ehci-msm-hsic.c b/drivers/usb/host/ehci-msm-hsic.c
index c5304e1..f16a0b6 100644
--- a/drivers/usb/host/ehci-msm-hsic.c
+++ b/drivers/usb/host/ehci-msm-hsic.c
@@ -2130,7 +2130,8 @@
 	if (mehci->enable_hbm)
 		hbm_init(hcd, pdata->disable_park_mode);
 
-	msm_bam_set_hsic_host_dev(&pdev->dev);
+	if (pdata && pdata->consider_ipa_handshake)
+		msm_bam_set_hsic_host_dev(&pdev->dev);
 
 	return 0;
 
@@ -2155,7 +2156,8 @@
 	struct msm_hsic_hcd *mehci = hcd_to_hsic(hcd);
 	struct msm_hsic_host_platform_data *pdata = mehci->dev->platform_data;
 
-	msm_bam_set_hsic_host_dev(NULL);
+	if (pdata && pdata->consider_ipa_handshake)
+		msm_bam_set_hsic_host_dev(NULL);
 
 	/* If the device was removed no need to call pm_runtime_disable */
 	if (pdev->dev.power.power_state.event != PM_EVENT_INVALID)