From patchwork Mon Jun 2 07:29:23 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Viresh Kumar X-Patchwork-Id: 31247 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-pd0-f197.google.com (mail-pd0-f197.google.com [209.85.192.197]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 7EE23203C2 for ; Mon, 2 Jun 2014 07:29:44 +0000 (UTC) Received: by mail-pd0-f197.google.com with SMTP id y10sf14699473pdj.4 for ; Mon, 02 Jun 2014 00:29:43 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:delivered-to:from:to:cc:subject :date:message-id:sender:precedence:list-id:x-original-sender :x-original-authentication-results:mailing-list:list-post:list-help :list-archive:list-unsubscribe; bh=W2JrLbHwFPsdekoPqkLhONfYPBDCDhSofFTOP8fs1fQ=; b=QEcp2s90p4O2kedhO6n2+/iJXsfH6GwkbUghPssGcqJHFPtbq41mzQLfvGtgj+Ez5i GvBvUCg7HDNnMvtsHk3jz6RFQ8CirORKJNHPaT06bG2YVXFqN952c8brBl5qTrPTOV9C JDemBazZp3bDl+ESrh51kc9EUlrLhVFE3T+gxJ/qQ83zczUlTG4oIHeeT9F4QHDhHQaq /PJyiWKKkPrdKjVSkEFzliZqtlLk6oqR+76Caeegnkp5XviqKF9D8xWn4p+8Ky+pIUnr 95axF+jIjFCwU/JZltDR1O9U4mKerUgz1HqQ5g5Dsezj5RjnTSWdj/XspoR343AgoWML BwRA== X-Gm-Message-State: ALoCoQnvH8Wz09z/adNl5mU6rZQB/7jBdyyTBE+MeU6F15CK/8PPG9oD4+HYHD9xMSJEasnIt4uG X-Received: by 10.66.181.195 with SMTP id dy3mr11551035pac.39.1401694183621; Mon, 02 Jun 2014 00:29:43 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.140.48.145 with SMTP id o17ls2002805qga.37.gmail; Mon, 02 Jun 2014 00:29:43 -0700 (PDT) X-Received: by 10.52.135.226 with SMTP id pv2mr1910261vdb.33.1401694183512; Mon, 02 Jun 2014 00:29:43 -0700 (PDT) Received: from mail-ve0-f176.google.com (mail-ve0-f176.google.com [209.85.128.176]) by mx.google.com with ESMTPS id xy4si7507193vcb.35.2014.06.02.00.29.43 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Mon, 02 Jun 2014 00:29:43 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.128.176 as permitted sender) client-ip=209.85.128.176; Received: by mail-ve0-f176.google.com with SMTP id jz11so4680131veb.7 for ; Mon, 02 Jun 2014 00:29:43 -0700 (PDT) X-Received: by 10.58.228.163 with SMTP id sj3mr2296053vec.28.1401694183427; Mon, 02 Jun 2014 00:29:43 -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.220.221.72 with SMTP id ib8csp77613vcb; Mon, 2 Jun 2014 00:29:43 -0700 (PDT) X-Received: by 10.68.240.5 with SMTP id vw5mr37796352pbc.113.1401694182650; Mon, 02 Jun 2014 00:29:42 -0700 (PDT) Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id os9si15029765pac.155.2014.06.02.00.29.42; Mon, 02 Jun 2014 00:29:42 -0700 (PDT) Received-SPF: none (google.com: linux-pm-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 S1752451AbaFBH3l (ORCPT + 13 others); Mon, 2 Jun 2014 03:29:41 -0400 Received: from mail-qa0-f51.google.com ([209.85.216.51]:49501 "EHLO mail-qa0-f51.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751996AbaFBH3k (ORCPT ); Mon, 2 Jun 2014 03:29:40 -0400 Received: by mail-qa0-f51.google.com with SMTP id w8so2219082qac.10 for ; Mon, 02 Jun 2014 00:29:40 -0700 (PDT) X-Received: by 10.224.160.202 with SMTP id o10mr47288387qax.8.1401694179992; Mon, 02 Jun 2014 00:29:39 -0700 (PDT) Received: from localhost (ec2-23-23-178-99.compute-1.amazonaws.com. [23.23.178.99]) by mx.google.com with ESMTPSA id a6sm20226831qag.17.2014.06.02.00.29.35 for (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Mon, 02 Jun 2014 00:29:39 -0700 (PDT) From: Viresh Kumar To: rjw@rjwysocki.net Cc: linaro-kernel@lists.linaro.org, linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org, arvind.chauhan@arm.com, edubezval@gmail.com, pavel@ucw.cz, lgirdwood@gmail.com, broonie@kernel.org, Viresh Kumar Subject: [PATCH V2 1/3] regulator: return -EINVAL from regulator_set_voltage() for !CONFIG_REGULATOR Date: Mon, 2 Jun 2014 12:59:23 +0530 Message-Id: <788accde56086078d69d3eba0d913114315de43a.1401693980.git.viresh.kumar@linaro.org> X-Mailer: git-send-email 2.0.0.rc2 Sender: linux-pm-owner@vger.kernel.org Precedence: list List-ID: X-Mailing-List: linux-pm@vger.kernel.org X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: viresh.kumar@linaro.org X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.128.176 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: , Currently regulator_set_voltage() returns zero when support for regulators isn't present in kernel, i.e. CONFIG_REGULATOR=n. Make it return -EINVAL to propagate error instead of success here. Audit of all users of this routine is done to make sure nothing breaks due to this change. Signed-off-by: Viresh Kumar --- V1->V2: - New patch as suggested by Mark. include/linux/regulator/consumer.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/linux/regulator/consumer.h b/include/linux/regulator/consumer.h index 1a4a8c1..28fa089 100644 --- a/include/linux/regulator/consumer.h +++ b/include/linux/regulator/consumer.h @@ -394,7 +394,7 @@ static inline void regulator_bulk_free(int num_consumers, static inline int regulator_set_voltage(struct regulator *regulator, int min_uV, int max_uV) { - return 0; + return -EINVAL; } static inline int regulator_get_voltage(struct regulator *regulator)