From patchwork Wed Oct 26 06:33:03 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Viresh Kumar X-Patchwork-Id: 79328 Delivered-To: patch@linaro.org Received: by 10.140.97.247 with SMTP id m110csp252035qge; Tue, 25 Oct 2016 23:34:22 -0700 (PDT) X-Received: by 10.99.122.87 with SMTP id j23mr1022149pgn.134.1477463662848; Tue, 25 Oct 2016 23:34:22 -0700 (PDT) Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id e83si898677pfb.195.2016.10.25.23.34.22; Tue, 25 Oct 2016 23:34:22 -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 S1754152AbcJZGeL (ORCPT + 14 others); Wed, 26 Oct 2016 02:34:11 -0400 Received: from mail-pf0-f172.google.com ([209.85.192.172]:34783 "EHLO mail-pf0-f172.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754064AbcJZGeJ (ORCPT ); Wed, 26 Oct 2016 02:34:09 -0400 Received: by mail-pf0-f172.google.com with SMTP id n85so17482073pfi.1 for ; Tue, 25 Oct 2016 23:34:09 -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=iqjmhnoWxZQRfluO+MedTx/1B/Elm1hegVoeRBtpbBM=; b=QbcZRmWFSG+ttw4VsGknDCLTRCiCWS3LKlFTaAQEjRcmgYK5uaOpFXc3JsZ0At7X2e 2kziuLKvMehQA1MYS//0K669KzPROgRnUwLrjlFhPNspDxKOllwIukDksnfEuMigdcOh E1rsfxm2u0EJscNGDICErDr/fmAK13gQM08Uo= 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=iqjmhnoWxZQRfluO+MedTx/1B/Elm1hegVoeRBtpbBM=; b=hmQiqdHKgAFJ4R9D6Nv/hppeddcqKGTfYi4M3qGIMS7lzkb3qPJTMGziDPt26QhXUN jrMStMUEEMLDF7Sa91tZlyZNixDAj/0EjaUiTAO3TQW3h3P1csIo4W1tMYOLxSLlx3Gl iXo00MC75cL2WgpFMcmUcccU36qD8lmmSIbQ0jqo3v7OQ8CgDeww21BBVfvw+B+O2/X8 S1Mqm/D/1t2IhaKxeWPo3z9UG5PJb5tMgbsWAT9W7rR7MDOrL+qAQTTxBldQeHtTCwpR LMLMo1yriEIfLHHSkdeV9b0kKuwvCPd7rGlO76PbGP0NTfEUJpFOWtyWdJi7VWhEo75H dAOg== X-Gm-Message-State: ABUngvfTUUo+DBXLo1Uc+Vy75gFtvTzgl+srA/HJgvDOsyRRv2bcdgmxBsiAiol5niE2w6vI X-Received: by 10.98.205.207 with SMTP id o198mr1209389pfg.114.1477463648849; Tue, 25 Oct 2016 23:34:08 -0700 (PDT) Received: from localhost ([171.61.116.10]) by smtp.gmail.com with ESMTPSA id n2sm1302250pfa.75.2016.10.25.23.34.07 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 25 Oct 2016 23:34:08 -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 V3 8/9] PM / OPP: Don't WARN on multiple calls to dev_pm_opp_set_regulators() Date: Wed, 26 Oct 2016 12:03:03 +0530 Message-Id: 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 f4f6b1fdbe06..3298fac01bb0 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; }