Skip to contentSkip to conversation

usb: phy: msm: fix possible build error

PATCH Stephen Boyd 2 participants 2 messages Feb 19, 2014 1 message not in the archive Arm Qualcomm mailing list

lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): [email protected]

#1 lore raw
Quoted 16 lines · Felipe Balbi

This will fail builds on configs where
CONFIG_PM_RUNTIME=y and CONFIG_PM_SLEEP=n.

Following build error will show up:

drivers/usb/phy/phy-msm-usb.c: In function ???msm_otg_runtime_suspend???:
drivers/usb/phy/phy-msm-usb.c:1693:2: error: implicit declaration of \
function ???msm_otg_suspend??? [-Werror=implicit-function-declaration]

   return msm_otg_suspend(motg);
   ^
 drivers/usb/phy/phy-msm-usb.c: In function ???msm_otg_runtime_resume???:
 drivers/usb/phy/phy-msm-usb.c:1701:2: error: implicit declaration of \
	function ???msm_otg_resume??? [-Werror=implicit-function-declaration]
   return msm_otg_resume(motg);
   ^
Quoted 4 lines

This patch fixes the error by defining msm_otg_{suspend,resume} whenever CONFIG_PM=y.

I'm lost. Didn't Josh send a patch for this to you already?

[1] https://patchwork.kernel.org/patch/3673401/

Quoted 29 lines
---
 drivers/usb/phy/phy-msm-usb.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/usb/phy/phy-msm-usb.c +2 -2
index 64c9d14e..96f31aa 100644
@@ -159,7 +159,7 @@ put_3p3:
 	return rc;
 }
 
-#ifdef CONFIG_PM_SLEEP
+#ifdef CONFIG_PM
 #define USB_PHY_SUSP_DIG_VOL  500000
 static int msm_hsusb_config_vddcx(int high)
 {
@@ -440,7 +440,7 @@ static int msm_otg_reset(struct usb_phy *phy)
 #define PHY_SUSPEND_TIMEOUT_USEC	(500 * 1000)
 #define PHY_RESUME_TIMEOUT_USEC	(100 * 1000)
 
-#ifdef CONFIG_PM_SLEEP
+#ifdef CONFIG_PM
 static int msm_otg_suspend(struct msm_otg *motg)
 {
 	struct usb_phy *phy = &motg->phy;
Signature · 1 line
1.9.0
Signature · 2 lines
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum,
hosted by The Linux Foundation
#2 lore raw

Hi,

Quoted 17 lines · Stephen Boyd
Quoted 16 lines · Felipe Balbi

This will fail builds on configs where
CONFIG_PM_RUNTIME=y and CONFIG_PM_SLEEP=n.

Following build error will show up:

drivers/usb/phy/phy-msm-usb.c: In function ???msm_otg_runtime_suspend???:
drivers/usb/phy/phy-msm-usb.c:1693:2: error: implicit declaration of \
function ???msm_otg_suspend??? [-Werror=implicit-function-declaration]

   return msm_otg_suspend(motg);
   ^
 drivers/usb/phy/phy-msm-usb.c: In function ???msm_otg_runtime_resume???:
 drivers/usb/phy/phy-msm-usb.c:1701:2: error: implicit declaration of \
	function ???msm_otg_resume??? [-Werror=implicit-function-declaration]
   return msm_otg_resume(motg);
   ^
Quoted 8 lines
Quoted 4 lines

This patch fixes the error by defining msm_otg_{suspend,resume} whenever CONFIG_PM=y.

I'm lost. Didn't Josh send a patch for this to you already?

[1] https://patchwork.kernel.org/patch/3673401/

true, dropped.

Signature · 1 line
balbi