From patchwork Tue Dec 22 10:16:17 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Viresh Kumar X-Patchwork-Id: 58858 Delivered-To: patch@linaro.org Received: by 10.112.89.199 with SMTP id bq7csp3139908lbb; Tue, 22 Dec 2015 02:17:19 -0800 (PST) X-Received: by 10.66.90.166 with SMTP id bx6mr34680546pab.75.1450779439520; Tue, 22 Dec 2015 02:17:19 -0800 (PST) Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id sw10si3585212pab.55.2015.12.22.02.17.19; Tue, 22 Dec 2015 02:17:19 -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; 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; dkim=neutral (body hash did not verify) header.i=@linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932670AbbLVKRS (ORCPT + 11 others); Tue, 22 Dec 2015 05:17:18 -0500 Received: from mail-pa0-f54.google.com ([209.85.220.54]:35281 "EHLO mail-pa0-f54.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932181AbbLVKRS (ORCPT ); Tue, 22 Dec 2015 05:17:18 -0500 Received: by mail-pa0-f54.google.com with SMTP id jx14so87422834pad.2 for ; Tue, 22 Dec 2015 02:17:17 -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=iIkon4rbzm8VBmBNAO2F4K/SuWrWbx1f6oaGvemY7qo=; b=NQs7Y0wev88KCQ2WFKSWw0pjdn2mqIPdp7FDoUg7Bc8EGm/Fi9uAtHtoMWfr+FYwJW LXeF2LMZecSxC7sg/OoG2li9cywA5yIwpgzONvALZGY6WLP+16t1YjEAsY+g3Uuf6GLK iuTxtysS+70A7W7wwPDZCbg5FhP2zy9tGYTbc= 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=iIkon4rbzm8VBmBNAO2F4K/SuWrWbx1f6oaGvemY7qo=; b=ez52Wc7lISSnPQ1fhW24bB1uSLo1p5ZkYIPKL7SJniw9MxOBAVbNrLoDlMNX360TEV zQol3ihm5uPyDYXuo5JLp9D8ctVTlFWew92KTaC1deMH43PM30MWpG6DctYU749Mp0b4 EQfrd+gW3nwsmIIZpzbUX3RLZNLoJTYDGa2OGZskyWdGRQgNgy9W4tClqObLxDbC6Xzr ZLA23l4LKz4Nk7aLKkgm4e+A+xEmJlkkvhE2tzgBZbkNvnwGPrirk/jpE3dtYTo8+mxn sFWCyOJVy1gJLT2rW1kHPMsCAWDI+Mcvr5Uo4jcRa9YOsmEgDz5FEBhQ/w0rtynup5zF yylA== X-Gm-Message-State: ALoCoQlIn5rUloDkHYri8Bjgjzi0MxVJlqc4wRzGXUYU37diQVTlBPsTjwujsC27lJqCgvWEPEpdUlPEd1Sk3oCa5WFsIvFHtQ== X-Received: by 10.66.66.140 with SMTP id f12mr4950981pat.158.1450779437751; Tue, 22 Dec 2015 02:17:17 -0800 (PST) Received: from localhost ([122.171.29.67]) by smtp.gmail.com with ESMTPSA id xr8sm44959960pab.26.2015.12.22.02.17.16 (version=TLS1_2 cipher=AES128-SHA bits=128/128); Tue, 22 Dec 2015 02:17:17 -0800 (PST) From: Viresh Kumar To: Rafael Wysocki Cc: linaro-kernel@lists.linaro.org, linux-pm@vger.kernel.org, Stephen Boyd , nm@ti.com, Viresh Kumar Subject: [PATCH 16/17] cpufreq: dt: drop references to DT node Date: Tue, 22 Dec 2015 15:46:17 +0530 Message-Id: <23b112584bab2af92d7a3f0b78f8e2b788482b2e.1450777582.git.viresh.kumar@linaro.org> X-Mailer: git-send-email 2.7.0.rc1.186.g94414c4 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 We don't need to get reference to DT node now, lets drop it. Signed-off-by: Viresh Kumar --- drivers/cpufreq/cpufreq-dt.c | 16 +--------------- 1 file changed, 1 insertion(+), 15 deletions(-) -- 2.7.0.rc1.186.g94414c4 -- 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/cpufreq/cpufreq-dt.c b/drivers/cpufreq/cpufreq-dt.c index 89c89dfab237..c9b7dafd986d 100644 --- a/drivers/cpufreq/cpufreq-dt.c +++ b/drivers/cpufreq/cpufreq-dt.c @@ -33,7 +33,6 @@ struct private_data { struct device *cpu_dev; struct regulator *cpu_reg; struct thermal_cooling_device *cdev; - unsigned int voltage_tolerance; /* in percentage */ const char *reg_name; }; @@ -140,7 +139,6 @@ static int allocate_resources(int cpu, struct device **cdev, static int cpufreq_init(struct cpufreq_policy *policy) { struct cpufreq_frequency_table *freq_table; - struct device_node *np; struct private_data *priv; struct device *cpu_dev; struct regulator *cpu_reg; @@ -157,13 +155,6 @@ static int cpufreq_init(struct cpufreq_policy *policy) return ret; } - np = of_node_get(cpu_dev->of_node); - if (!np) { - dev_err(cpu_dev, "failed to find cpu%d node\n", policy->cpu); - ret = -ENOENT; - goto out_put_reg_clk; - } - /* Get OPP-sharing information from "operating-points-v2" bindings */ ret = dev_pm_opp_of_get_sharing_cpus(cpu_dev, policy->cpus); if (ret) { @@ -174,7 +165,7 @@ static int cpufreq_init(struct cpufreq_policy *policy) if (ret == -ENOENT) opp_v1 = true; else - goto out_node_put; + goto out_put_reg_clk; } /* @@ -242,7 +233,6 @@ static int cpufreq_init(struct cpufreq_policy *policy) } priv->reg_name = name; - of_property_read_u32(np, "voltage-tolerance", &priv->voltage_tolerance); ret = dev_pm_opp_init_cpufreq_table(cpu_dev, &freq_table); if (ret) { @@ -284,8 +274,6 @@ static int cpufreq_init(struct cpufreq_policy *policy) policy->cpuinfo.transition_latency = transition_latency; - of_node_put(np); - return 0; out_free_cpufreq_table: @@ -296,8 +284,6 @@ static int cpufreq_init(struct cpufreq_policy *policy) dev_pm_opp_of_cpumask_remove_table(policy->cpus); if (opp_v1) dev_pm_opp_put_regulator(cpu_dev); -out_node_put: - of_node_put(np); out_put_reg_clk: clk_put(cpu_clk); if (!IS_ERR(cpu_reg))