From patchwork Wed Feb 19 04:35:58 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Felipe Balbi X-Patchwork-Id: 24927 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-yh0-f70.google.com (mail-yh0-f70.google.com [209.85.213.70]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 1A4C3202B2 for ; Wed, 19 Feb 2014 04:37:31 +0000 (UTC) Received: by mail-yh0-f70.google.com with SMTP id c41sf36920210yho.9 for ; Tue, 18 Feb 2014 20:37:31 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:delivered-to:from:to:cc:subject:date:message-id :mime-version:sender:precedence:list-id:x-original-sender :x-original-authentication-results:mailing-list:list-post:list-help :list-archive:list-unsubscribe:content-type :content-transfer-encoding; bh=DCtbej+zbKAG9lvS7anRR0jwZJHXcUoIyI0Sp7QXhNk=; b=UrkVt404CsHsKbN8sxqxfTn1aXS2VxRyDZfXGgBJNOuQQRifkaRHNBlEiLXEMj50fl fC6AqZI7L8MKKx5f+YeLnmHDJE9Kx+TuJcH27Q5j4scqT6qTQKMmRtKsKWiUU3VXbyED Y8ca5O3XX1/Am5UymBO5+IvuyYNPDHSmgQ7S06ZgIIkxEKIE3CfRHSbguMjMytyxcWCB ZbQwBoVbgu3B+qsm9Kz/ZJnPXiZjQY3gqB6AQgmvNoD7mh6RnBdWsfAVet3fo7ktrTt7 rzqZ1EtVf8g+28Wif9uAUcfPIHoEv7Ea1B/PkVGPN1ivtTAzUKXoDOj6yve8ZHHhYIJk pn4w== X-Gm-Message-State: ALoCoQkUpWmTQH4bJQHdkTdWMHCx+3uFv2Z8t4bUua/dSMNYrLCnFR0hlcWn9vha17b+WfCwG1zp X-Received: by 10.236.134.174 with SMTP id s34mr12641492yhi.32.1392784651465; Tue, 18 Feb 2014 20:37:31 -0800 (PST) X-BeenThere: patchwork-forward@linaro.org Received: by 10.140.43.201 with SMTP id e67ls1590670qga.32.gmail; Tue, 18 Feb 2014 20:37:31 -0800 (PST) X-Received: by 10.220.161.132 with SMTP id r4mr12000127vcx.29.1392784651357; Tue, 18 Feb 2014 20:37:31 -0800 (PST) Received: from mail-vc0-f182.google.com (mail-vc0-f182.google.com [209.85.220.182]) by mx.google.com with ESMTPS id tr5si6310490vdc.39.2014.02.18.20.37.31 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 18 Feb 2014 20:37:31 -0800 (PST) Received-SPF: neutral (google.com: 209.85.220.182 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) client-ip=209.85.220.182; Received: by mail-vc0-f182.google.com with SMTP id id10so14199211vcb.13 for ; Tue, 18 Feb 2014 20:37:31 -0800 (PST) X-Received: by 10.221.37.1 with SMTP id tc1mr11533988vcb.32.1392784651253; Tue, 18 Feb 2014 20:37:31 -0800 (PST) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patch@linaro.org Received: by 10.220.174.196 with SMTP id u4csp268961vcz; Tue, 18 Feb 2014 20:37:30 -0800 (PST) X-Received: by 10.67.23.135 with SMTP id ia7mr36962504pad.5.1392784650406; Tue, 18 Feb 2014 20:37:30 -0800 (PST) Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id b4si20484728pbe.238.2014.02.18.20.37.30; Tue, 18 Feb 2014 20:37:30 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-usb-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751227AbaBSEh2 (ORCPT + 3 others); Tue, 18 Feb 2014 23:37:28 -0500 Received: from bear.ext.ti.com ([192.94.94.41]:35776 "EHLO bear.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751142AbaBSEh1 (ORCPT ); Tue, 18 Feb 2014 23:37:27 -0500 Received: from dflxv15.itg.ti.com ([128.247.5.124]) by bear.ext.ti.com (8.13.7/8.13.7) with ESMTP id s1J4bHeK021276; Tue, 18 Feb 2014 22:37:17 -0600 Received: from DLEE70.ent.ti.com (dlemailx.itg.ti.com [157.170.170.113]) by dflxv15.itg.ti.com (8.14.3/8.13.8) with ESMTP id s1J4bHRA029463; Tue, 18 Feb 2014 22:37:17 -0600 Received: from dflp33.itg.ti.com (10.64.6.16) by DLEE70.ent.ti.com (157.170.170.113) with Microsoft SMTP Server id 14.3.174.1; Tue, 18 Feb 2014 22:37:16 -0600 Received: from localhost (ileax41-snat.itg.ti.com [10.172.224.153]) by dflp33.itg.ti.com (8.14.3/8.13.8) with ESMTP id s1J4bGjC017095; Tue, 18 Feb 2014 22:37:16 -0600 From: Felipe Balbi To: "Ivan T. Ivanov" , Peter Chen , Jingoo Han , Stephen Boyd CC: Linux USB Mailing List , Felipe Balbi Subject: [PATCH] usb: phy: msm: fix possible build error Date: Tue, 18 Feb 2014 22:35:58 -0600 Message-ID: <1392784558-26854-1-git-send-email-balbi@ti.com> X-Mailer: git-send-email 1.9.0 MIME-Version: 1.0 Sender: linux-usb-owner@vger.kernel.org Precedence: list List-ID: X-Mailing-List: linux-usb@vger.kernel.org X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: balbi@ti.com X-Original-Authentication-Results: mx.google.com; spf=neutral (google.com: 209.85.220.182 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org X-Google-Group-Id: 836684582541 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , 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); ^ This patch fixes the error by defining msm_otg_{suspend,resume} whenever CONFIG_PM=y. Signed-off-by: Felipe Balbi --- drivers/usb/phy/phy-msm-usb.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/usb/phy/phy-msm-usb.c b/drivers/usb/phy/phy-msm-usb.c index 64c9d14e..96f31aa 100644 --- a/drivers/usb/phy/phy-msm-usb.c +++ b/drivers/usb/phy/phy-msm-usb.c @@ -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;