From patchwork Fri Oct 24 19:15:11 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Felipe Balbi X-Patchwork-Id: 39494 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-wg0-f72.google.com (mail-wg0-f72.google.com [74.125.82.72]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 4CA7E24026 for ; Fri, 24 Oct 2014 19:15:47 +0000 (UTC) Received: by mail-wg0-f72.google.com with SMTP id l18sf1004519wgh.3 for ; Fri, 24 Oct 2014 12:15:46 -0700 (PDT) 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=qZtR4MYW2eyn6pJqYFXPZdLwV+VzAJf+kkmKf1PUPJA=; b=AvoYTLLABqv2nSkfvkAebnBkzdfdVVdOE3J5K0tBT/SWaAMeu42gJUuPZhIl/ISX2O NeSyfgsaTVqHEQ06qMvWEDeRlmfs5cIZmHQgXIfMl8oV6knB/GW1F0F8Vk3OmmnmfQMF wAUh5aoNfz51QV4Qo+Jir2S/zv1hWBOQ8m2ISaTBYXfNPniQZFQZJ8Tjucab/7wBjQkN Swz7teRU7wIYMMtc7VUuZW7xD7J/Cga7GcmXS8GdWsVbKs5XLgGTGrBFAxWK76P66e4X 1wV15a1KQ5c37gI6QoEmXuuYiR5r/mdZsPozlfMxFyFAA7XaADyxRujx33LPQnxuyqjD SsJQ== X-Gm-Message-State: ALoCoQkV/NWGqaknL3JzR52aOab8DodoNA3rnM0Yau6n3jsJrOs8UcRDYH9enTlnLZJ2HPLwj0Dr X-Received: by 10.112.32.163 with SMTP id k3mr8731lbi.17.1414178146134; Fri, 24 Oct 2014 12:15:46 -0700 (PDT) X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.23.74 with SMTP id k10ls487880laf.6.gmail; Fri, 24 Oct 2014 12:15:45 -0700 (PDT) X-Received: by 10.112.42.114 with SMTP id n18mr6573443lbl.44.1414178145893; Fri, 24 Oct 2014 12:15:45 -0700 (PDT) Received: from mail-la0-f41.google.com (mail-la0-f41.google.com. [209.85.215.41]) by mx.google.com with ESMTPS id od3si8282239lbb.84.2014.10.24.12.15.45 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 24 Oct 2014 12:15:45 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.215.41 as permitted sender) client-ip=209.85.215.41; Received: by mail-la0-f41.google.com with SMTP id pn19so3429611lab.0 for ; Fri, 24 Oct 2014 12:15:45 -0700 (PDT) X-Received: by 10.112.130.41 with SMTP id ob9mr6397141lbb.74.1414178145561; Fri, 24 Oct 2014 12:15:45 -0700 (PDT) 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.112.84.229 with SMTP id c5csp489748lbz; Fri, 24 Oct 2014 12:15:44 -0700 (PDT) X-Received: by 10.70.63.9 with SMTP id c9mr6756091pds.104.1414178144009; Fri, 24 Oct 2014 12:15:44 -0700 (PDT) Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id ak10si4823647pbd.169.2014.10.24.12.15.43 for ; Fri, 24 Oct 2014 12:15:43 -0700 (PDT) Received-SPF: none (google.com: linux-kernel-owner@vger.kernel.org does not designate permitted sender hosts) client-ip=209.132.180.67; Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752915AbaJXTPl (ORCPT + 26 others); Fri, 24 Oct 2014 15:15:41 -0400 Received: from devils.ext.ti.com ([198.47.26.153]:34815 "EHLO devils.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751377AbaJXTPj (ORCPT ); Fri, 24 Oct 2014 15:15:39 -0400 Received: from dlelxv90.itg.ti.com ([172.17.2.17]) by devils.ext.ti.com (8.13.7/8.13.7) with ESMTP id s9OJFWSd022302; Fri, 24 Oct 2014 14:15:33 -0500 Received: from DLEE71.ent.ti.com (dlee71.ent.ti.com [157.170.170.114]) by dlelxv90.itg.ti.com (8.14.3/8.13.8) with ESMTP id s9OJFWOB023767; Fri, 24 Oct 2014 14:15:32 -0500 Received: from dlep32.itg.ti.com (157.170.170.100) by DLEE71.ent.ti.com (157.170.170.114) with Microsoft SMTP Server id 14.3.174.1; Fri, 24 Oct 2014 14:15:32 -0500 Received: from localhost (ileax41-snat.itg.ti.com [10.172.224.153]) by dlep32.itg.ti.com (8.14.3/8.13.8) with ESMTP id s9OJFVrD015822; Fri, 24 Oct 2014 14:15:32 -0500 From: Felipe Balbi To: , CC: Linux Kernel Mailing List , , , , , Felipe Balbi Subject: [PATCH] regulator: stub out devm_regulator_get_exclusive Date: Fri, 24 Oct 2014 14:15:11 -0500 Message-ID: <1414178111-19525-1-git-send-email-balbi@ti.com> X-Mailer: git-send-email 2.1.0.GIT MIME-Version: 1.0 Sender: linux-kernel-owner@vger.kernel.org Precedence: list List-ID: X-Mailing-List: linux-kernel@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=pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.215.41 as permitted sender) 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: , If we don't stup that call out, we will have build failures for any drivers using that function when .config happens to have CONFIG_REGULATOR=n. One such case below, found with randconfig drivers/gpu/drm/msm/mdp/mdp4/mdp4_kms.c: In function ‘mdp4_kms_init’: drivers/gpu/drm/msm/mdp/mdp4/mdp4_kms.c:384:2: error: implicit declaration \ of function ‘devm_regulator_get_exclusive’ [-Werror=implicit-function-declaration] mdp4_kms->vdd = devm_regulator_get_exclusive(&pdev->dev, "vdd"); ^ drivers/gpu/drm/msm/mdp/mdp4/mdp4_kms.c:384:16: error: assignment makes \ pointer from integer without a cast [-Werror] mdp4_kms->vdd = devm_regulator_get_exclusive(&pdev->dev, "vdd"); ^ Signed-off-by: Felipe Balbi --- include/linux/regulator/consumer.h | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/include/linux/regulator/consumer.h b/include/linux/regulator/consumer.h index d347c80..ff61f3b 100644 --- a/include/linux/regulator/consumer.h +++ b/include/linux/regulator/consumer.h @@ -291,6 +291,11 @@ regulator_get_optional(struct device *dev, const char *id) return ERR_PTR(-ENODEV); } +static inline struct regulator *__must_check +devm_regulator_get_exclusive(struct device *dev, const char *id) +{ + return ERR_PTR(-ENODEV); +} static inline struct regulator *__must_check devm_regulator_get_optional(struct device *dev, const char *id)