From patchwork Tue Oct 4 11:56:50 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Viresh Kumar X-Patchwork-Id: 77257 Delivered-To: patch@linaro.org Received: by 10.140.106.72 with SMTP id d66csp2173666qgf; Tue, 4 Oct 2016 04:57:48 -0700 (PDT) X-Received: by 10.98.89.133 with SMTP id k5mr439236pfj.113.1475582268015; Tue, 04 Oct 2016 04:57:48 -0700 (PDT) Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id l8si42358172pfi.252.2016.10.04.04.57.47; Tue, 04 Oct 2016 04:57:48 -0700 (PDT) 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 S1754012AbcJDL5j (ORCPT + 14 others); Tue, 4 Oct 2016 07:57:39 -0400 Received: from mail-pf0-f177.google.com ([209.85.192.177]:34944 "EHLO mail-pf0-f177.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753942AbcJDL5h (ORCPT ); Tue, 4 Oct 2016 07:57:37 -0400 Received: by mail-pf0-f177.google.com with SMTP id s13so75225026pfd.2 for ; Tue, 04 Oct 2016 04:57:37 -0700 (PDT) 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=Eaex46tAIyEi9e+DCZrqMA62KKrZ1Z4gbXDVl0lg7Vk=; b=O4yF4dE1rdT93S4kEsOIlQbzmrF/Pe5qZVXSVHjCj+zggs/zrLDwjoYY4l62pUUkRP J2StNs4CdH9ATgdHW7iMXmU55TezEsWprF8SNXngH9CGkUh42ZF0h+iSbN/E8cMz2Avt LlwDOUlnqgc6O71CQ7GDK8jPf+T5yLDzaF4MM= 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=Eaex46tAIyEi9e+DCZrqMA62KKrZ1Z4gbXDVl0lg7Vk=; b=P+w6NNvAXx247STfJcmzh4MN4bC0RECAG2H3Tg42FemJJQVXtOmUT0xVuboAYcCdVA nDBedoHVE652kYLXSA0N+hk1nq4eC2xOPQp/F2C/AGND38sdv37Ff8xJWoLWTwo7chRG YO1u5nrU70cIuCdyK+QpNIhotxS7s7aUZu5YJV27NCw1X1fKRhwZXYH7XGcllvBLilbI gbtDoHqVWAsYhjprlKJVfaRSuC+m4pnZ4/mRH+afIHTZGrG9xgjgfwpAl4iD5n/UoqDY bhssORYMUl5hQFFUJw9bJlihi82iSbzQhdQTseuCmf6ZtHEN0bLCEL0hR81MM19eJOiB Ujxg== X-Gm-Message-State: AA6/9RkcnEpW8aoPL5T9k2t5b3vw+n8q1V/8PkRWtqLQM5DzmT0hkflRmV32dWuBsRAoiNfS X-Received: by 10.98.9.215 with SMTP id 84mr5476965pfj.44.1475582251914; Tue, 04 Oct 2016 04:57:31 -0700 (PDT) Received: from localhost ([122.171.115.29]) by smtp.gmail.com with ESMTPSA id ad15sm5438969pac.33.2016.10.04.04.57.30 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 04 Oct 2016 04:57:31 -0700 (PDT) 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, Viresh Kumar Subject: [PATCH 8/8] PM / OPP: Don't WARN on multiple calls to dev_pm_opp_set_regulators() Date: Tue, 4 Oct 2016 17:26:50 +0530 Message-Id: <7299375cc6bf038e2ed2c7c497d350513bb3d428.1475581665.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 --- 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 f7c4ef194aac..51dd71d16269 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 *names[], } /* Already have regulators set */ - if (WARN_ON(opp_table->regulators)) { + if (opp_table->regulators) { ret = -EBUSY; goto err; }