From patchwork Wed Nov 30 05:14:12 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Viresh Kumar X-Patchwork-Id: 84953 Delivered-To: patch@linaro.org Received: by 10.140.20.101 with SMTP id 92csp86996qgi; Tue, 29 Nov 2016 21:14:59 -0800 (PST) X-Received: by 10.99.230.83 with SMTP id p19mr55486192pgj.138.1480482899475; Tue, 29 Nov 2016 21:14:59 -0800 (PST) Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id d4si62722453pfb.185.2016.11.29.21.14.59; Tue, 29 Nov 2016 21:14:59 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of devicetree-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 devicetree-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=devicetree-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 S1753383AbcK3FO6 (ORCPT + 7 others); Wed, 30 Nov 2016 00:14:58 -0500 Received: from mail-pg0-f46.google.com ([74.125.83.46]:35430 "EHLO mail-pg0-f46.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753023AbcK3FO5 (ORCPT ); Wed, 30 Nov 2016 00:14:57 -0500 Received: by mail-pg0-f46.google.com with SMTP id p66so77784976pga.2 for ; Tue, 29 Nov 2016 21:14: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=XLx/1JEYbPF8G9OZpgJZWZEh0tTFLiD7aj6RzIRqHlM=; b=atLqZLuqT/fvjHG1GIi7lrDJUrQ+6+0IqA8Pxz6owwtj86ycY608CCul7O5Qf3QnUE sxccgcJrHBE9beoZEVW1ZvDvEruqmfwhu8ZvspA9tqrXpBkqiraHfDZYx/gysgEqnkdu 2R8JdKg6LGmPjEBhvpP4l9CAQZKB1vKZp3qRk= 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=XLx/1JEYbPF8G9OZpgJZWZEh0tTFLiD7aj6RzIRqHlM=; b=O04jksvP7NkCpOCHmSj9UBTaWuPOgdNdARng9lY23V+d6wrkl0YDynDoJVkiiZV7ut qnedykTlESu9LXVEN5wBwIkCQgAcC9+M8HwcFGiq+XqFv8NZgAoaPyKcVsRZjxgnOkBc e6JdjFJystX10B4md0aiJGgjcst2k4vUhTnFqmZqmSul6HbEO5ZcFPFwpKb8M7aluUt9 1wJqAOSOISwGXRNW0lO0wjhQ+OnPmRp74X7BHHJ0g5K8Aq/yTiy1mMAXsOJna814o0N0 CAhIlrd4H3XNUdgLHVRpLeNkmwutgBFrcw+ZJ3Btn/X7w+8h5JUMMyi6BR6MWTrekmHD SRAw== X-Gm-Message-State: AKaTC02T4LOEuTFRCk9FmUjIp0qFQpqe3GP8VNLAEcIN4L/11VxD+U2q5HQkbeiKGXjTqsSW X-Received: by 10.98.70.150 with SMTP id o22mr31846245pfi.134.1480482897010; Tue, 29 Nov 2016 21:14:57 -0800 (PST) Received: from localhost ([122.172.143.30]) by smtp.gmail.com with ESMTPSA id l11sm98832621pfb.28.2016.11.29.21.14.55 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 29 Nov 2016 21:14: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 V6 09/10] PM / OPP: Don't WARN on multiple calls to dev_pm_opp_set_regulators() Date: Wed, 30 Nov 2016 10:44:12 +0530 Message-Id: <65c5e211e27c3d6862e78097ecb16a146376bc9b.1480481312.git.viresh.kumar@linaro.org> X-Mailer: git-send-email 2.7.1.410.g6faf27b In-Reply-To: References: In-Reply-To: References: Sender: devicetree-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: devicetree@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 devicetree" 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 1fb188b424c7..f60d7f943b64 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) { opp_table = ERR_PTR(-EBUSY); goto err; }