From patchwork Fri Oct 12 11:11:17 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Viresh Kumar X-Patchwork-Id: 148756 Delivered-To: patch@linaro.org Received: by 2002:a2e:8595:0:0:0:0:0 with SMTP id b21-v6csp599248lji; Fri, 12 Oct 2018 04:12:15 -0700 (PDT) X-Google-Smtp-Source: ACcGV62OPXbWyFA9F7hXn5KiMsUe4kpnw4okYm9m75gmUtoZjSgEVX+4gHnxRi5LnuwYj7e5dSit X-Received: by 2002:a17:902:64c2:: with SMTP id y2-v6mr5486514pli.35.1539342735294; Fri, 12 Oct 2018 04:12:15 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1539342735; cv=none; d=google.com; s=arc-20160816; b=RzpGuEIxV2hu0eoEWQ6DJAgzX8I/A3aOmfjOeLtaBgkTesk+MDXBSc6AhbuJKs5uZD R23/syfRTGgpF54Q4SkSObU7q6h9h4sjZmpt4QADlbJw+Te7QOIvvVrV/UYhlQyxtLwi ZLwwdHVy1F/uTZEQH5j2ZirNaofcvajFiEt+6QHlb0oRB6SEAwnZ/rZo0ebIGvFrckEI tCxGrMW2yxjmCUOPwF/7eO6RwTziMq1EOhWdgtxKYzTNAkZq6oZaLC3FAgXEma2nxdjv FSfNet0it1ItIrhy7BTGSF7Uulw2rNybPn7GBFqukWdZ5VfjVqpxr+anxyZ3w74wo5wr 8J2A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:dkim-signature; bh=akQeUpsf7fkn8621Db/E2werSvh2FTMXzqxwQvFVpBE=; b=B5wvv8f5s7YdvwoZCk5bMa9oIINw4wQpogFSgyjEjJ5WTXHUdU+soPzolH0u9KbYCK o7+7ZItg13KVi2hGPB4aDPoQxDJamxj8J/Ngg/2CWNaIZOA867ApzUNehnsBCEI/xdHl vobUKGcrjGhXDjbiX+i1SZ396hVOH/7cN1r8BU9L6rzw3cxZoqW3h8n2sbLiNuOsutZR 4t+H+K8sYrl7GeWpum9VegN8rsQl5jh9biB/yRThA8m3qI6e00i+ZURNZjpKd+W7h9Ik pwrkCPVD85YOci2QGhJMHk5Y9fddXKVVSLEPoa6iRlMuKZuyefas8cq0VlksbPzVqxr4 OZsQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=WBAA+tT9; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id a135-v6si1108035pfd.241.2018.10.12.04.12.14; Fri, 12 Oct 2018 04:12:15 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=WBAA+tT9; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728633AbeJLSoI (ORCPT + 32 others); Fri, 12 Oct 2018 14:44:08 -0400 Received: from mail-pf1-f193.google.com ([209.85.210.193]:38665 "EHLO mail-pf1-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728606AbeJLSoH (ORCPT ); Fri, 12 Oct 2018 14:44:07 -0400 Received: by mail-pf1-f193.google.com with SMTP id f29-v6so6040247pff.5 for ; Fri, 12 Oct 2018 04:12:12 -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; bh=akQeUpsf7fkn8621Db/E2werSvh2FTMXzqxwQvFVpBE=; b=WBAA+tT98s2CgT/WkXpszZlqtqAppwvmI8+XNAJXW9xjFpM4rp7i3xiRBZUgf/WqkW uBhmw4n0KxkZeG1xcyDqDLyg6WeJit6/aIBrdXlrktTRx+1/uZRK6g7fJiLG2o15vpfi SCZH1LOy1R1LlCFg2UX8BmzAXYk4Soeg9YF1k= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=akQeUpsf7fkn8621Db/E2werSvh2FTMXzqxwQvFVpBE=; b=dO4qF3to/MH8ptGPt28KMmRhJ+rtNpWSaqrgMWW7D8SLaw4/Wmtrb2u42NeuYgpl/L eR4ppyNFsxmWlfNBngpXe7FA6LtiS9XErd6L6L9obydqcdOrUEPUiRXDYJLcYGG4ceDx 7Q/vKp2CNTkbVip3l2Ok18TZmKMJJs6Dgjr5k2sCisvR3pV3dfQxbHGreU96zNVsRU/5 ElcFeKeHTnSS1pJNnznUp7SkXzOdPwGTqlOx/cchd2DSIOfxYWNqX0j/hjK/86SVSa60 NIXZ6ZV3zWcBthj5+D314efpQeGU4y55a1X5U5JPvQxP1Vxj2urq49fL29U48+ttROAv NmhA== X-Gm-Message-State: ABuFfoiwLQhgmju+dinmdgwRShB1Kfneurkx+DsD9e/quFm7Oq2nJE2m qw3VSVSG2cjZBkrAADeksAbR5g== X-Received: by 2002:a65:45c9:: with SMTP id m9-v6mr5046699pgr.212.1539342731845; Fri, 12 Oct 2018 04:12:11 -0700 (PDT) Received: from localhost ([122.171.67.41]) by smtp.gmail.com with ESMTPSA id v83-v6sm4510860pfa.103.2018.10.12.04.12.10 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 12 Oct 2018 04:12:11 -0700 (PDT) From: Viresh Kumar To: ulf.hansson@linaro.org, Viresh Kumar , Nishanth Menon , Stephen Boyd , "Rafael J. Wysocki" Cc: Viresh Kumar , linux-pm@vger.kernel.org, Vincent Guittot , niklas.cassel@linaro.org, rnayak@codeaurora.org, linux-kernel@vger.kernel.org Subject: [PATCH V2 9/9] OPP: Remove of_dev_pm_opp_find_required_opp() Date: Fri, 12 Oct 2018 16:41:17 +0530 Message-Id: X-Mailer: git-send-email 2.18.0.rc1.242.g61856ae69a2c In-Reply-To: References: Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org This isn't used anymore, remove it. Signed-off-by: Viresh Kumar --- drivers/opp/of.c | 54 ------------------------------------------ include/linux/pm_opp.h | 5 ---- 2 files changed, 59 deletions(-) -- 2.18.0.rc1.242.g61856ae69a2c diff --git a/drivers/opp/of.c b/drivers/opp/of.c index b059d833f920..623f651f9e11 100644 --- a/drivers/opp/of.c +++ b/drivers/opp/of.c @@ -1013,60 +1013,6 @@ unsigned int of_get_required_opp_performance_state(struct device_node *np, } EXPORT_SYMBOL_GPL(of_get_required_opp_performance_state); -/** - * of_dev_pm_opp_find_required_opp() - Search for required OPP. - * @dev: The device whose OPP node is referenced by the 'np' DT node. - * @np: Node that contains the "required-opps" property. - * - * Returns the OPP of the device 'dev', whose phandle is present in the "np" - * node. Although the "required-opps" property supports having multiple - * phandles, this helper routine only parses the very first phandle in the list. - * - * Return: Matching opp, else returns ERR_PTR in case of error and should be - * handled using IS_ERR. - * - * The callers are required to call dev_pm_opp_put() for the returned OPP after - * use. - */ -struct dev_pm_opp *of_dev_pm_opp_find_required_opp(struct device *dev, - struct device_node *np) -{ - struct dev_pm_opp *temp_opp, *opp = ERR_PTR(-ENODEV); - struct device_node *required_np; - struct opp_table *opp_table; - - opp_table = _find_opp_table(dev); - if (IS_ERR(opp_table)) - return ERR_CAST(opp_table); - - required_np = of_parse_phandle(np, "required-opps", 0); - if (unlikely(!required_np)) { - dev_err(dev, "Unable to parse required-opps\n"); - goto put_opp_table; - } - - mutex_lock(&opp_table->lock); - - list_for_each_entry(temp_opp, &opp_table->opp_list, node) { - if (temp_opp->available && temp_opp->np == required_np) { - opp = temp_opp; - - /* Increment the reference count of OPP */ - dev_pm_opp_get(opp); - break; - } - } - - mutex_unlock(&opp_table->lock); - - of_node_put(required_np); -put_opp_table: - dev_pm_opp_put_opp_table(opp_table); - - return opp; -} -EXPORT_SYMBOL_GPL(of_dev_pm_opp_find_required_opp); - /** * dev_pm_opp_get_of_node() - Gets the DT node corresponding to an opp * @opp: opp for which DT node has to be returned for diff --git a/include/linux/pm_opp.h b/include/linux/pm_opp.h index f440e625f1fd..fdd87a21dac4 100644 --- a/include/linux/pm_opp.h +++ b/include/linux/pm_opp.h @@ -313,7 +313,6 @@ int dev_pm_opp_of_cpumask_add_table(const struct cpumask *cpumask); void dev_pm_opp_of_cpumask_remove_table(const struct cpumask *cpumask); int dev_pm_opp_of_get_sharing_cpus(struct device *cpu_dev, struct cpumask *cpumask); struct device_node *dev_pm_opp_of_get_opp_desc_node(struct device *dev); -struct dev_pm_opp *of_dev_pm_opp_find_required_opp(struct device *dev, struct device_node *np); struct device_node *dev_pm_opp_get_of_node(struct dev_pm_opp *opp); unsigned int of_get_required_opp_performance_state(struct device_node *np, int index); #else @@ -350,10 +349,6 @@ static inline struct device_node *dev_pm_opp_of_get_opp_desc_node(struct device return NULL; } -static inline struct dev_pm_opp *of_dev_pm_opp_find_required_opp(struct device *dev, struct device_node *np) -{ - return NULL; -} static inline struct device_node *dev_pm_opp_get_of_node(struct dev_pm_opp *opp) { return NULL;