From patchwork Tue Dec 8 15:43:35 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 105146 Delivered-To: patch@linaro.org Received: by 10.112.147.194 with SMTP id tm2csp105644lbb; Tue, 8 Dec 2015 07:44:14 -0800 (PST) X-Received: by 10.98.8.136 with SMTP id 8mr5871065pfi.16.1449589453903; Tue, 08 Dec 2015 07:44:13 -0800 (PST) Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 187si5919266pfa.195.2015.12.08.07.44.13; Tue, 08 Dec 2015 07:44:13 -0800 (PST) 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 S965239AbbLHPoL (ORCPT + 28 others); Tue, 8 Dec 2015 10:44:11 -0500 Received: from mout.kundenserver.de ([212.227.17.10]:61721 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S965194AbbLHPoJ (ORCPT ); Tue, 8 Dec 2015 10:44:09 -0500 Received: from wuerfel.localnet ([134.3.118.24]) by mrelayeu.kundenserver.de (mreue101) with ESMTPSA (Nemesis) id 0MPGpE-1aAi9B3IBs-004VkB; Tue, 08 Dec 2015 16:43:37 +0100 From: Arnd Bergmann To: Mark Brown Cc: Liam Girdwood , linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Tuomas Tynkkynen , Thierry Reding Subject: [PATCH] regulator: add regulator_sync_voltage inline dummy Date: Tue, 08 Dec 2015 16:43:35 +0100 Message-ID: <1983152.2iYiBkp4xd@wuerfel> User-Agent: KMail/4.11.5 (Linux/3.16.0-10-generic; KDE/4.11.5; x86_64; ; ) MIME-Version: 1.0 X-Provags-ID: V03:K0:Eujvx5iCak05aPASly+cRIpEWih00l3o2QeMRDNwN1DV5rZVbUH xF5ewCrar5Pfm9Tz23QPHlI3xECw6lUCSiPiRywPr347ZALIAkOvUGnSy1Xhd24nagtZrVb 4YlTekNpf7fK+MEYiTydwRIgzKgVGWuekp99tGh4cw9A/7qjKfsKN4qNa/0r8rTcQIAltV/ yMyryFwopeKyIzIfBisLQ== X-UI-Out-Filterresults: notjunk:1; V01:K0:mbR+/urxOiY=:HWxJKB7BLQJizMoxL/lsw4 +g1Cb53Hr3QqJ1HEArgD/5i/OjCoW3j+zLx3TVJqtM8tgp7fecLlMhITADWLNhsQdsn4JYYiE mo3JjhcozrUotyymWFF1/HL15NlW8MGHhMWCHKWg+ZgeHUYAlxIfxYgrHeDiACxLcPdIEnloU LNQ40ttJCaC7TD4IO/qaIasTX/anqF8Ph20dfMJK1EFn13KF9rqgmU7tuA7fsacyqTO4P32HE aZ18+eFcv1eioRb0O/QyeHJq3BoFgn7StD5oMSaz6nseCSRlPWuvKy2Z6v/mgAp3pv6mhvgqb jA8tqCrWdSCWU/o7Uc0r+x9zbyX9MoypqcS198tLExW1geoqkhsa1Ay2WDB8C8Jshfrnn+7fB FtmByPjjKuOyqBW6GvHQ/Erez93yztxJ/S5SfCWSr9U1MXtOiwVzkLJ0LquyRu0ed6dNBsRJU GsWNo9kg7uJ5uzCfM7GMqvn9OUf0eAJTD4scBnjCVHwu51pgbmHt3lYphfUk1RTLv8jvoAMUl a5NG771UsbNZnBI5mal4EaAaKTG9GUPlw7qrWyJxVYTA799hb8yW6pB5MFNQm+UD7Puma2N/a jhNHd8rhTgw57e1vai8qNJU3dGZ7jNpDpxpgFayXIe+x4ZTRrfa5Wxjf1oJU0/qt5lH47pA4A p5KoNQYmVI86JzK4QJWHWHqc1ReG2vD5GkmBvfGHvfJj4wbzoGT/hq12ocBQDiqy8STGMt7RF PZtqaq7WEzv935Ms Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Only one driver calls regulator_sync_voltage(), but that driver can currently be built with CONFIG_REGULATOR disabled, producing this build error: drivers/cpufreq/tegra124-cpufreq.c: In function 'tegra124_cpu_switch_to_pllx': drivers/cpufreq/tegra124-cpufreq.c:68:2: error: implicit declaration of function 'regulator_sync_voltage' [-Werror=implicit-function-declaration] regulator_sync_voltage(priv->vdd_cpu_reg); This modifies the API header so we provide a static inline function with the same prototype as the normal function of this name. This matches what we do for all other regulator API functions and avoids the build error. Signed-off-by: Arnd Bergmann --- include/linux/regulator/consumer.h | 5 +++++ 1 file changed, 5 insertions(+) -- 2.1.0.rc2 -- 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/ diff --git a/include/linux/regulator/consumer.h b/include/linux/regulator/consumer.h index 48603506f8de..d45e2e99396a 100644 --- a/include/linux/regulator/consumer.h +++ b/include/linux/regulator/consumer.h @@ -458,6 +458,11 @@ static inline int regulator_get_voltage(struct regulator *regulator) return -EINVAL; } +static inline int regulator_sync_voltage(struct regulator *regulator) +{ + return 0; +} + static inline int regulator_is_supported_voltage(struct regulator *regulator, int min_uV, int max_uV) {