Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752900AbaAQRyO (ORCPT ); Fri, 17 Jan 2014 12:54:14 -0500 Received: from mail-pb0-f51.google.com ([209.85.160.51]:43248 "EHLO mail-pb0-f51.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752661AbaAQRyM (ORCPT ); Fri, 17 Jan 2014 12:54:12 -0500 From: Kevin Hilman To: Josh Cartwright Cc: Felipe Balbi , Russell King - ARM Linux , linux-arm-kernel@lists.infradead.org, linux-arm-msm@vger.kernel.org, "Ivan T. Ivanov" , Greg Kroah-Hartman , linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] usb: phy: msm: fix compilation errors when !CONFIG_PM_SLEEP References: <20140117132232.GC15937@n2100.arm.linux.org.uk> <1389979580-14812-1-git-send-email-joshc@codeaurora.org> Date: Fri, 17 Jan 2014 09:54:09 -0800 In-Reply-To: <1389979580-14812-1-git-send-email-joshc@codeaurora.org> (Josh Cartwright's message of "Fri, 17 Jan 2014 11:26:20 -0600") Message-ID: <87lhyemr3y.fsf@linaro.org> User-Agent: Gnus/5.130008 (Ma Gnus v0.8) Emacs/24.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Josh Cartwright writes: > Both the PM_RUNTIME and PM_SLEEP callbacks call into the common > msm_otg_{suspend,resume} routines, however these routines are only being > built when CONFIG_PM_SLEEP. In addition, msm_otg_{suspend,resume} also > depends on msm_hsusb_config_vddcx(), which is only built when > CONFIG_PM_SLEEP. > > Fix the CONFIG_PM_RUNTIME, !CONFIG_PM_SLEEP case by changing the > preprocessor conditional, and moving msm_hsusb_config_vddcx(). > > While we're here, eliminate the CONFIG_PM conditional for setting > up the dev_pm_ops. > > This address the following errors Russell King has hit doing randconfig > builds: > > drivers/usb/phy/phy-msm-usb.c: In function 'msm_otg_runtime_suspend': > drivers/usb/phy/phy-msm-usb.c:1691:2: error: implicit declaration of function 'msm_otg_suspend' > drivers/usb/phy/phy-msm-usb.c: In function 'msm_otg_runtime_resume': > drivers/usb/phy/phy-msm-usb.c:1699:2: error: implicit declaration of function 'msm_otg_resume' > > Cc: Ivan T. Ivanov > Reported-by: Russell King > Signed-off-by: Josh Cartwright [...] > @@ -440,7 +414,32 @@ 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 > +#if defined(CONFIG_PM_SLEEP) || defined(CONFIG_PM_RUNTIME) nit: you should just use CONFIG_PM here since that is what it's for. c.f. kernel/power/Kconfig: config PM def_bool y depends on PM_SLEEP || PM_RUNTIME Kevin -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/