From mboxrd@z Thu Jan 1 00:00:00 1970 From: 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> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: QUOTED-PRINTABLE Return-path: Sender: linux-kernel-owner@vger.kernel.org To: broonie@kernel.org, lgirdwood@gmail.com Cc: Linux Kernel Mailing List , airlied@linux.ie, robdclark@gmail.com, davidb@codeaurora.org, dri-devel@lists.freedesktop.org, Felipe Balbi List-Id: dri-devel@lists.freedesktop.org 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=3Dn. One such case below, found with randconfig drivers/gpu/drm/msm/mdp/mdp4/mdp4_kms.c: In function =E2=80=98mdp4_kms_= init=E2=80=99: drivers/gpu/drm/msm/mdp/mdp4/mdp4_kms.c:384:2: error: implicit declarat= ion \ of function =E2=80=98devm_regulator_get_exclusive=E2=80=99 [-Werror=3D= implicit-function-declaration] mdp4_kms->vdd =3D 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 =3D 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/regulat= or/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 c= har *id) return ERR_PTR(-ENODEV); } =20 +static inline struct regulator *__must_check +devm_regulator_get_exclusive(struct device *dev, const char *id) +{ + return ERR_PTR(-ENODEV); +} =20 static inline struct regulator *__must_check devm_regulator_get_optional(struct device *dev, const char *id) --=20 2.1.0.GIT