From patchwork Tue Nov 29 06:36:56 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Viresh Kumar X-Patchwork-Id: 84511 Delivered-To: patch@linaro.org Received: by 10.182.1.168 with SMTP id 8csp2108156obn; Mon, 28 Nov 2016 22:38:04 -0800 (PST) X-Received: by 10.84.160.204 with SMTP id v12mr16243813plg.122.1480401484907; Mon, 28 Nov 2016 22:38:04 -0800 (PST) Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id y90si30073985plh.249.2016.11.28.22.38.04; Mon, 28 Nov 2016 22:38:04 -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 S1756034AbcK2Ghz (ORCPT + 13 others); Tue, 29 Nov 2016 01:37:55 -0500 Received: from mail-pf0-f173.google.com ([209.85.192.173]:33878 "EHLO mail-pf0-f173.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755971AbcK2Ghd (ORCPT ); Tue, 29 Nov 2016 01:37:33 -0500 Received: by mail-pf0-f173.google.com with SMTP id c4so30067754pfb.1 for ; Mon, 28 Nov 2016 22:37:32 -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=mFZmYpzGcGj8jlhXuzkqx31gKLV7CWww5ImCwYmF+8s=; b=WIlUjK7d+Opqdx5VHheD9fU6FuezGrOk5Et8OLbb2AxeR6ePLpZYRm4M6qCveGc/wL mVWxvrIrK9/fSMqKlCGGlL9xYcv0EHeY4PlnejZYDXslRIoWowp8HvLrw88rPJOk3gcE cX8tfVFEC2efTMWUFUPAmBQilVPyblQeIMuuU= 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=mFZmYpzGcGj8jlhXuzkqx31gKLV7CWww5ImCwYmF+8s=; b=bF06uzfdE5kZII5APXdfCeLLRb5Zlru3qkvHKvflLgFNxuf1KSJiKsKxbRHwyAoSp0 0eidCyRzmPhXYn6HTP8yRvMXHqlitoWGIEs7FPSlg5QDgpfUbYx0eypfMfSjucN2+ipL 8U4p9BMWF/WFj6Lz18AIMq+mhaRiayVMDB8r11yaRSZ1Fu7LiEWyen0DDg2jqZqZo/OV A2HKZbuM1/rjRUkUyGROq9tXYORF4trwEMV9DbIb5A2K1UHbRj78KrX7jpiCecWQIA9p 8d+JX6DIhiSs72zxTRib6ut12pG+ANE3QDV3K4nrd6w+hnOF5d4fZ+bh80/qk9DbyaR1 nWPw== X-Gm-Message-State: AKaTC03VcYw+3H9QahCMhRfhp0fBsC+afce7Hq/Jd8QkT+KAkXwO5EwpLokqSbM0sMAd9DL+ X-Received: by 10.84.138.165 with SMTP id 34mr58321609plp.20.1480401451953; Mon, 28 Nov 2016 22:37:31 -0800 (PST) Received: from localhost ([122.172.89.192]) by smtp.gmail.com with ESMTPSA id v82sm91799029pfi.6.2016.11.28.22.37.31 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 28 Nov 2016 22:37:31 -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 V5 09/10] PM / OPP: Don't WARN on multiple calls to dev_pm_opp_set_regulators() Date: Tue, 29 Nov 2016 12:06:56 +0530 Message-Id: <2b7f54b32e1a07d8dbfcdbccf1c71aa8657f32f8.1480401041.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 ddd4915ffd4f..3c9f223709ab 100644 --- a/drivers/base/power/opp/core.c +++ b/drivers/base/power/opp/core.c @@ -1484,7 +1484,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; }