From patchwork Thu Oct 20 08:45:02 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Viresh Kumar X-Patchwork-Id: 78448 Delivered-To: patch@linaro.org Received: by 10.140.97.247 with SMTP id m110csp666000qge; Thu, 20 Oct 2016 01:46:22 -0700 (PDT) X-Received: by 10.99.123.1 with SMTP id w1mr6376651pgc.155.1476953182327; Thu, 20 Oct 2016 01:46:22 -0700 (PDT) Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id l184si10405196pge.112.2016.10.20.01.46.21; Thu, 20 Oct 2016 01:46: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 S934583AbcJTIqD (ORCPT + 14 others); Thu, 20 Oct 2016 04:46:03 -0400 Received: from mail-pf0-f180.google.com ([209.85.192.180]:36623 "EHLO mail-pf0-f180.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S934582AbcJTIpq (ORCPT ); Thu, 20 Oct 2016 04:45:46 -0400 Received: by mail-pf0-f180.google.com with SMTP id e6so32522280pfk.3 for ; Thu, 20 Oct 2016 01:45:46 -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=JhbL4uzJj3Ztfm9bG4qtX1hpYBz+9om583FlfbcN/Bd681JAB80JNAjZ1eY1Hl/Add gYd9IiScM4TB8ETwipuX5TVJYEje16QlrM2xNtmOvHkgXvKy8R9dbnRUE1vIjigXis7h Ol0toyHdEgHoQzyxlPWLRuuno/ezzRiLQWdyU= 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=KN8cvoKQFi09ZXuZQE/rx0QKBjYOa1azkI+Pv0xT69cwDKHwwVXBXVECnPl4RaxyNP LnJB8UYgb9uVrj1PoyfXzEdDSqMAhT7Y6zvOJvX/Fhld5mNIvJHpwwUhQMNyY2HHZ67E XOf7njXhYUn72Piitudd6DBdDH4+l3PqLCTFZusBLxf055NXdq4iSDr/symvEWlsaaGx de7Gx9Zp6p9vKdzrIe+yEZ9sVDPwY5J9a5ZnbebBTXPB65DIaDw//t7JM26rNUw1ogfB iFotvt8uXk+dSdeXTVmN8dPnXvOlvEfyUQdwDruk1jt8IIIgDuxBn33Akzq4qoPtFwVW cOmQ== X-Gm-Message-State: AA6/9Rk8+LOV/oQlWZfxdo/DqVi21P/wGwY4o8jdZP1k6mv7J6QGDNp2LP+hYzlSgxtLrqaQ X-Received: by 10.98.106.196 with SMTP id f187mr19253100pfc.91.1476953140509; Thu, 20 Oct 2016 01:45:40 -0700 (PDT) Received: from localhost ([171.61.116.10]) by smtp.gmail.com with ESMTPSA id u17sm69532096pfa.83.2016.10.20.01.45.39 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 20 Oct 2016 01:45:40 -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 V2 8/8] PM / OPP: Don't WARN on multiple calls to dev_pm_opp_set_regulators() Date: Thu, 20 Oct 2016 14:15:02 +0530 Message-Id: <3017eefdae58adc192ccb9c829fa32ee9b58c799.1476952750.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 Reviewed-by: Stephen Boyd 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; }