From patchwork Wed Jun 4 14:46:00 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 4294591 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id A40E2BEEA7 for ; Wed, 4 Jun 2014 14:49:24 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 9980C201BA for ; Wed, 4 Jun 2014 14:49:23 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.9]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 8F87A201B4 for ; Wed, 4 Jun 2014 14:49:21 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1WsCSe-0006zp-Jo; Wed, 04 Jun 2014 14:46:40 +0000 Received: from mout.kundenserver.de ([212.227.126.130]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1WsCSb-0006xb-L3 for linux-arm-kernel@lists.infradead.org; Wed, 04 Jun 2014 14:46:38 +0000 Received: from wuerfel.localnet (HSI-KBW-134-3-133-35.hsi14.kabel-badenwuerttemberg.de [134.3.133.35]) by mrelayeu.kundenserver.de (node=mreue007) with ESMTP (Nemesis) id 0M0GLZ-1WXFFk2WQH-00uaKv; Wed, 04 Jun 2014 16:46:01 +0200 From: Arnd Bergmann To: Mark Brown Subject: [PATCH] regulator: add regulator_can_change_voltage stub Date: Wed, 04 Jun 2014 16:46 +0200 Message-ID: <4605709.T97aRyQTUM@wuerfel> User-Agent: KMail/4.11.5 (Linux/3.11.0-18-generic; KDE/4.11.5; x86_64; ; ) MIME-Version: 1.0 X-Provags-ID: V02:K0:P4CXyV8CmrjJB4BXL9MoNqybCbERmuZxvxsd2eApnNN c5QaEW3goSwYLbvIeFUEQRQt1M/rlcsrvyqTRf8K7IPbsyTT33 i+bzEWQAOsAwzyb7lNBG4J64OTJTYrmRBv1sN4JmgpwStfFGVt KqHWGrdSIwBClVv20rxQiVxcjiPZ28kz3cyujCv53Jlsx9d7yP v7GWD9Fkt87xV2VXAh90qzgxynhmxtIaBWW0vhx1P8aDturosv 87uPYK5qT5kGRvgu7q7BO+3bkQQEpUwOHw6WgoM5p6XEBAjAF6 N2l3Aim9o/s8rAjfL/OsDhl/bqoeh9eK2s+cZ5FSmVqdA/jO5d SF9yORnWFFsNu5661sWw= X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20140604_074638_011210_2B501D9C X-CRM114-Status: UNSURE ( 9.53 ) X-CRM114-Notice: Please train this message. X-Spam-Score: 0.0 (/) Cc: Tomi Valkeinen , linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Spam-Status: No, score=-2.5 required=5.0 tests=BAYES_00,RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP When CONFIG_REGULATOR is not set, we cannot call regulator_can_change_voltage() from a device driver, which results in a build error like video/fbdev/omap2/dss/hdmi5.c: In function 'hdmi_init_regulator': video/fbdev/omap2/dss/hdmi5.c:149:2: error: implicit declaration of function 'regulator_can_change_voltage' [-Werror=implicit-function-declaration] even for drivers that don't require the regulator API normally. Such a use was recently added in the omap2+ hdmi driver. This avoids the problem by adding a static inline function stub in the API header, as we have for most of the other regulator functions as well. Signed-off-by: Arnd Bergmann Cc: Mark Brown Cc: Tomi Valkeinen diff --git a/include/linux/regulator/consumer.h b/include/linux/regulator/consumer.h index a2d9d81..14ec18d 100644 --- a/include/linux/regulator/consumer.h +++ b/include/linux/regulator/consumer.h @@ -395,6 +395,11 @@ static inline void regulator_bulk_free(int num_consumers, { } +static inline int regulator_can_change_voltage(struct regulator *regulator) +{ + return 0; +} + static inline int regulator_set_voltage(struct regulator *regulator, int min_uV, int max_uV) {