From patchwork Wed Sep 14 13:51:01 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 101791 Delivered-To: patch@linaro.org Received: by 10.140.106.72 with SMTP id d66csp1886542qgf; Wed, 14 Sep 2016 06:52:19 -0700 (PDT) X-Received: by 10.98.13.73 with SMTP id v70mr4726357pfi.149.1473861139503; Wed, 14 Sep 2016 06:52:19 -0700 (PDT) Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id l5si4873343pax.160.2016.09.14.06.52.18; Wed, 14 Sep 2016 06:52:19 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1762696AbcINNwQ (ORCPT + 27 others); Wed, 14 Sep 2016 09:52:16 -0400 Received: from mout.kundenserver.de ([212.227.126.131]:55638 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1762495AbcINNv7 (ORCPT ); Wed, 14 Sep 2016 09:51:59 -0400 Received: from wuerfel.lan. ([78.43.20.153]) by mrelayeu.kundenserver.de (mreue003) with ESMTPA (Nemesis) id 0LiYwK-1bA0tt3j80-00ck5Q; Wed, 14 Sep 2016 15:51:34 +0200 From: Arnd Bergmann To: Greg Kroah-Hartman Cc: Kishon Vijay Abraham I , Hans de Goede , Martin Blumenstingl , Jerome Brunet , Arnd Bergmann , Felipe Balbi , Peter Chen , Rob Herring , linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH] usb: use of_usb_get_dr_mode_by_phy() inline helper without USB Date: Wed, 14 Sep 2016 15:51:01 +0200 Message-Id: <20160914135126.3122728-1-arnd@arndb.de> X-Mailer: git-send-email 2.9.0 X-Provags-ID: V03:K0:gCqp/VA5BwYtvzhqP5DuEDZwLMS2wgApnzVbBmId6mQl7WDW0kn suqWCARnZryhADFMAG5P5fk/YBtZWGAeQC9GuqsYGMglt+cKmF5fF4P0MSSU+4zC2j1l0qH bQTQu9P18nBh/l3GfXdmVppwExFIm6Kz3TlR5lSDDmbzaU+qCSkP4JmzRnRrQDkc1Zug3n+ 5wXMq7E4zf74KLmISOENw== X-UI-Out-Filterresults: notjunk:1; V01:K0:HUMYns5JMNg=:a2j8WL1l3WneA4Yx+lYH+p MBpSjOhKkk7Wcof5hiGrW2mS3UlLtwaEXPqpoCDGvkDeuLVMy8Kghu8igqrUJwoOGSyKXtoCo VtH4y+t4FxeDftqER/acCrxEP5b42o0CuLUE0i1NFxmxPqPX7p3sXgog0btV6eaIb+8WFwk7Z Mllb0yrc30n91OEvWmuKyDc3Why71cQdPiPZFCpLwGnmNjsI71aLNtn9ZPACMH4LwD73rQkG1 7WVvF+Xfr6U7P4Rc2gfFtJ2kbeLZvF8kuN7gUcJBmbmoMzd0xUhNX8ZEui55sx8UtS99G0GFH i52fRVviyGJdK8ljTyMESMC8MORg3gOwiazLBXvR8T500MXI/b4WfNwTQJThQUJVUO3w5Hfj5 syBzphuzWFvs9rCfo5ck1Xm+Nd2DEWR1tI9rVRIHAMlfjH9IcwMTErHUcVMQ0B1WKIAs1LZoJ Y+Nz6yT8VKMpLfZTmSIZ0Ue5txGyggINNdUvUCiPbNOA6K2hPHqObhnL6G/flLhFdcL/ubU8V 8eBSCMvcGBiGSAzbrlxGTb4o0JDhrz2I9Ip62I35IHubyyqW+kwM3whPftNQJT1w2tnJ83n11 NB9d9sF+er6QUnPNyvYtSvu7152LHtH/srW+HcqL+eGbYcKG/t4GdUjO2IyMQby7v8NWQixQ4 aShgBT4yZFhbBr8qOtzI2Jo6u1+vy6PKvKxbwx8Z32Ts8s2kkMZFB+vIORL7PoTATwW0= Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org We have had two new PHY drivers call of_usb_get_dr_mode_by_phy() recently without having a dependency on CONFIG_USB_COMMON, resulting in a link error: ERROR: "of_usb_get_dr_mode_by_phy" [drivers/phy/phy-meson-usb2.ko] undefined! I fixed up the first one (sun4i) by adding the dependency, but if we get more of this, it's probably better to allow the PHY drivers to build without the dependency. This changes the guard around declarations so we only refer to them when both CONFIG_OF and CONFIG_USB_COMMON are enabled, which is the right thing for all of the first calls but not the one that already has a correct check for USB_SUPPORT rather than USB_COMMON. Signed-off-by: Arnd Bergmann Fixes: 5ed935458519 ("phy: meson: add USB2 PHY support for Meson8b and GXBB") --- include/linux/usb/of.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- 2.9.0 diff --git a/include/linux/usb/of.h b/include/linux/usb/of.h index 5ff9032ee1b4..3ed539626840 100644 --- a/include/linux/usb/of.h +++ b/include/linux/usb/of.h @@ -11,7 +11,7 @@ #include #include -#if IS_ENABLED(CONFIG_OF) +#if IS_ENABLED(CONFIG_OF) && IS_ENABLED(CONFIG_USB_COMMON) enum usb_dr_mode of_usb_get_dr_mode_by_phy(struct device_node *np, int arg0); bool of_usb_host_tpl_support(struct device_node *np); int of_usb_update_otg_caps(struct device_node *np,