From patchwork Thu Nov 24 11:36:18 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Viresh Kumar X-Patchwork-Id: 83878 Delivered-To: patch@linaro.org Received: by 10.182.1.168 with SMTP id 8csp104800obn; Thu, 24 Nov 2016 03:37:59 -0800 (PST) X-Received: by 10.84.217.149 with SMTP id p21mr4383612pli.121.1479987479003; Thu, 24 Nov 2016 03:37:59 -0800 (PST) Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 19si39017465pfr.164.2016.11.24.03.37.58; Thu, 24 Nov 2016 03:37:58 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-pm-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org; spf=pass (google.com: best guess record for domain of linux-pm-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-pm-owner@vger.kernel.org; dmarc=fail (p=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S965262AbcKXLhz (ORCPT + 13 others); Thu, 24 Nov 2016 06:37:55 -0500 Received: from mail-pg0-f48.google.com ([74.125.83.48]:35870 "EHLO mail-pg0-f48.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S965587AbcKXLg7 (ORCPT ); Thu, 24 Nov 2016 06:36:59 -0500 Received: by mail-pg0-f48.google.com with SMTP id f188so17834398pgc.3 for ; Thu, 24 Nov 2016 03:36:58 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :in-reply-to:references; bh=rJUPkDXcxZBZqcOyz9JN4XFjo1yhxhgqr8bVl1niW1Q=; b=WHpb1raAJ1Qeu6vSbf5JMGf8bi3ujM4ZW7Zn5BTYo699f7+DrHU7Cmg3nZO90g+d9X vKHpc1sCvS2YMgE/Vu0AI5rv98EQrwoRzALLF+Y+xRQheYY99gllgqzF2X3578mQ5yQm xhZ2gFq8yrCCdIhy11qqL8+p618jV71zrN5Do= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:in-reply-to:references; bh=rJUPkDXcxZBZqcOyz9JN4XFjo1yhxhgqr8bVl1niW1Q=; b=ipeMkwQZbuyMyVa7lP03EwhTr+uPofjYyEJ+myQag5OoAFFGq1Br2IgxxhE8IwFRXV 2Tm2A0K0lsb72dESpQkzzGzPLqNBHBOidazW7WHW5APIKtJ8ZVlvW2z8Fi2lGVW8Zcfh tUMTCFNSoOiTcw4ZFw+bLz/WRte12Tihu/nTqHq45fKLcNAlgYCYtFsdypFaZl5Y25ST fQMsUYuHQO12jWAfeNYOfyt7YECJ+l+13/HMEj3n4/6ifmyFfoZF4e85HAzUkoRgKo0R GEl+4SDV6OlMAdO00R+pOU6O2bem1qVRh/c1VBxKw17TgWruUJrFlP9aoRFuhPpD+pju CQmw== X-Gm-Message-State: AKaTC03ecNhmKRZ3g+S0vMy5twiWVlW9iENyI2kkXd/n0uzNhwSxeV5RPdJ7Vr6fx86qenFX X-Received: by 10.99.106.200 with SMTP id f191mr3360372pgc.143.1479987418349; Thu, 24 Nov 2016 03:36:58 -0800 (PST) Received: from localhost ([122.172.89.192]) by smtp.gmail.com with ESMTPSA id t25sm16803008pgo.9.2016.11.24.03.36.57 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 24 Nov 2016 03:36:57 -0800 (PST) From: Viresh Kumar To: Rafael Wysocki , nm@ti.com, sboyd@codeaurora.org, Viresh Kumar Cc: linaro-kernel@lists.linaro.org, linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org, Vincent Guittot , robh@kernel.org, d-gerlach@ti.com, broonie@kernel.org, devicetree@vger.kernel.org, Viresh Kumar Subject: [PATCH V4 09/10] PM / OPP: Don't WARN on multiple calls to dev_pm_opp_set_regulators() Date: Thu, 24 Nov 2016 17:06:18 +0530 Message-Id: <0d981ba7f4069a8f55ae309d038d055ebeaabe1f.1479986492.git.viresh.kumar@linaro.org> X-Mailer: git-send-email 2.7.1.410.g6faf27b In-Reply-To: References: In-Reply-To: References: Sender: linux-pm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pm@vger.kernel.org If a platform specific OPP driver has called this routine first and set the regulators, then the second call from cpufreq-dt driver will hit the WARN_ON(). Remove the WARN_ON(), but continue to return error in such cases. Signed-off-by: Viresh Kumar Reviewed-by: Stephen Boyd Tested-by: Dave Gerlach --- drivers/base/power/opp/core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- 2.7.1.410.g6faf27b -- To unsubscribe from this list: send the line "unsubscribe linux-pm" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/drivers/base/power/opp/core.c b/drivers/base/power/opp/core.c index 7c945d5950bf..d3f4c625b809 100644 --- a/drivers/base/power/opp/core.c +++ b/drivers/base/power/opp/core.c @@ -1469,7 +1469,7 @@ int dev_pm_opp_set_regulators(struct device *dev, const char * const names[], } /* Already have regulators set */ - if (WARN_ON(opp_table->regulators)) { + if (opp_table->regulators) { ret = -EBUSY; goto err; }