From patchwork Thu Dec 1 10:58:22 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Viresh Kumar X-Patchwork-Id: 86016 Delivered-To: patch@linaro.org Received: by 10.140.20.101 with SMTP id 92csp633548qgi; Thu, 1 Dec 2016 02:59:06 -0800 (PST) X-Received: by 10.84.197.1 with SMTP id m1mr83916925pld.159.1480589946483; Thu, 01 Dec 2016 02:59:06 -0800 (PST) Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id h25si68790422pfd.139.2016.12.01.02.59.06; Thu, 01 Dec 2016 02:59:06 -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 S1757406AbcLAK7E (ORCPT + 13 others); Thu, 1 Dec 2016 05:59:04 -0500 Received: from mail-pf0-f178.google.com ([209.85.192.178]:36644 "EHLO mail-pf0-f178.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1757311AbcLAK7D (ORCPT ); Thu, 1 Dec 2016 05:59:03 -0500 Received: by mail-pf0-f178.google.com with SMTP id 189so45854511pfz.3 for ; Thu, 01 Dec 2016 02:58:57 -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=OkvXJ5Q6GkQAZeOIcNe8Gi+xv5mUTbgA1QkKdbBmL/M=; b=Wd9hUNu9P+m7aUDnqCg1vCpltk3UH+icuIXhyTU+dsj+j5T7CoEhBP1HCah+mmbWYF UaIqz2cD6J7TwjGIEfDmiUqbdZ93+VU/sNVNJzqOrNGZIsKHWCKPZSAKEPHzx+Zz3ZeW rX/CG6IER05doJqEkQHM4QHgSRZtlvH+vKFPQ= 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=OkvXJ5Q6GkQAZeOIcNe8Gi+xv5mUTbgA1QkKdbBmL/M=; b=NGtQmF0+xIXFC9NhC1gCKVPTw7aZcNjsLYBAew3iwXfNEjV9jVt2XmHZrR8zLMljhF DoDNvZKPcOp1esS1FuKi8gjpWySJWLwm0v9MaCKhfCymwCrKD4D/MQpeRACJyHxwnI62 WkCJq4A1h/GA6uSOMCVHo5t9SLewgI/8Y0vef/PEtWpOr8Ao9/vImIctRnaAxYWd4Gm/ c/cmaTVYWt7SjeCdjquCbfD8bYAeuX2RQD5cxk8Wozqg89Ea/LbCt3XVx3y9bsdfrmgE 2BRqrXRZ42Nn5cRTQ/y4BjD+aRC11VrdjqNRUy0JAmPk3teKc/DG+um8sZyxf71J2zqR hXsQ== X-Gm-Message-State: AKaTC00873tpp+6tAf8Ubv0f9NSzSR/Jd2T3Rwds+93mo1L8UEOwNEIkam6+68vdmoz8mZuU X-Received: by 10.99.247.69 with SMTP id f5mr69114366pgk.81.1480589937388; Thu, 01 Dec 2016 02:58:57 -0800 (PST) Received: from localhost ([122.172.143.30]) by smtp.gmail.com with ESMTPSA id y200sm104797514pfb.16.2016.12.01.02.58.56 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 01 Dec 2016 02:58:56 -0800 (PST) From: Viresh Kumar To: Rafael Wysocki , Viresh Kumar , Nishanth Menon , Stephen Boyd Cc: linaro-kernel@lists.linaro.org, linux-pm@vger.kernel.org, Vincent Guittot , robh@kernel.org, d-gerlach@ti.com, broonie@kernel.org, devicetree@vger.kernel.org, Viresh Kumar Subject: [PATCH V7 09/10] PM / OPP: Don't WARN on multiple calls to dev_pm_opp_set_regulators() Date: Thu, 1 Dec 2016 16:28:22 +0530 Message-Id: <321955a2bda07c0c832fcf80106b92f21803cab6.1480564564.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 eceebef36f21..35ff06283738 100644 --- a/drivers/base/power/opp/core.c +++ b/drivers/base/power/opp/core.c @@ -1485,7 +1485,7 @@ struct opp_table *dev_pm_opp_set_regulators(struct device *dev, } /* Already have regulators set */ - if (WARN_ON(opp_table->regulators)) { + if (opp_table->regulators) { ret = -EBUSY; goto err; }