From patchwork Fri Jun 29 06:19:40 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Viresh Kumar X-Patchwork-Id: 140504 Delivered-To: patch@linaro.org Received: by 2002:a2e:9754:0:0:0:0:0 with SMTP id f20-v6csp451342ljj; Thu, 28 Jun 2018 23:20:39 -0700 (PDT) X-Google-Smtp-Source: AAOMgpdNYjOM9eyBRWJvdN7InIZI8Nj+VLA00ImnlB2FKsBWEFHFnYFXvjCsL5jY5FDqStFOQeh0 X-Received: by 2002:a62:51c4:: with SMTP id f187-v6mr13239297pfb.88.1530253239582; Thu, 28 Jun 2018 23:20:39 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1530253239; cv=none; d=google.com; s=arc-20160816; b=YpIyWjFFZiofg8esU3MtcOmjYRgkGi0XFupfTbsEuWQDtg01NOb0AJpNmBhl2fL1VL 1csiKEdbJjpGkeAzrMAscTc9GwNw26Fxpp4H3TXriv5xH76mYWoZ/ycNxI0fqOBmBd42 sJbzuSJlxdM6OKb2rxtaT1cYdR/SaeYzvo9deT8Z5ZVsNoDFOMFpI06xYLLqC8ANt1bp eULGnVqzPad7D/ipd48Jb9L77OyGe0BKN00G+izMka5+pzfzslssHOldXZFQ0XuUaVmv MeXYeKfa+MS+bA4YufZdQVQ3YtBPu9k1cgBCCG8zhK47pBnVZN8BmaMz81awmG6/GjnD jNpA== 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:arc-authentication-results; bh=EkwPwO0lER5EARerditu2y59jlVuf9fgSDG7a5KSRuc=; b=S1egXAexrlBlpKiBw7CczeumLn0vTjtmAUuWV0ld5CTAEA5TFoZm/XP1Y8T0e43cXh HjVRW6kBysDIM0psZzVopsdZ5Sq/ZEoafhMCpt8s3QtFkHaxMFcgvhldmmcG55QOT2Mt jz9XMiK4l7PBTCXTuUddmQSSfdfafZegQ6CbTzCvMXWmoo2H/yG7Fmef88eWR0rEoed9 73FyJdEtrCrs6F2SDT7pfDmUug/J+R+QEXow9pMJngUsrnm3aG83yiB/dIDICP+BAU+b ENeAUpuz+uTq9hJ2FMYQpZuugB3KQmq1K1vfLbMs9Qt9C5mDOo/pbrEKCW1TzBPisL9f jACA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=JyTGrJWG; 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 f35-v6si8318665plh.193.2018.06.28.23.20.39; Thu, 28 Jun 2018 23:20:39 -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=JyTGrJWG; 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 S933617AbeF2GUi (ORCPT + 31 others); Fri, 29 Jun 2018 02:20:38 -0400 Received: from mail-pl0-f66.google.com ([209.85.160.66]:45596 "EHLO mail-pl0-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754883AbeF2GUZ (ORCPT ); Fri, 29 Jun 2018 02:20:25 -0400 Received: by mail-pl0-f66.google.com with SMTP id bi1-v6so3956329plb.12 for ; Thu, 28 Jun 2018 23:20:25 -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=EkwPwO0lER5EARerditu2y59jlVuf9fgSDG7a5KSRuc=; b=JyTGrJWG0kjcQ/TxaLHFrKvcTPh6fGRmY/j4pIYClJJhp8Nwh0xRdDT/tkod4z0JHu sZ00GEMH0J/E/eBo1Afx3CR5fK4flgM8wBPWXW43eWOhuTYQ6i7FtG2iL/zZF21dIRpK VWgHRdds3k1iZnv0fkYAviFjrcRsAUG0STxcM= 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=EkwPwO0lER5EARerditu2y59jlVuf9fgSDG7a5KSRuc=; b=GVallkmC2SThd0vnXF2zw77p0OHSczvvjLPn5OlUm2z9NoaTscLRzl/s0dtkKTydRL JK5SPp/R2PEBDaIkA8ulDfJ0g3gN7PLWjszJlPfJ5CnT/5lMCqggX/y9FedZ8qGp9Cgf ntgN0AA3eE46GvriN0E59F94zBPZCISD1ptylcf4fTuyUmzrGJKnyYaBbGuEX5smrVil yGGy7yoDuRnQQi4ZAdOC8iXg5rKJc7X7VmXbgKilUDm+5EtYMRN+7GBGyq2pCqAHhEEY O7xbkBfkHPv41iDX6Yna8OG45TWfsbzp+oXtGT3xWuYc1F/paZ7NY4uQOe0sKv+adcw5 gsWQ== X-Gm-Message-State: APt69E1l2dptQZ2F3gECUOlH2iTq7uRevKTGmMrH8ehAD5qJAZe6ZZG/ Ro/A9fzJOp6VbLYR+mkS/JInAg== X-Received: by 2002:a17:902:b612:: with SMTP id b18-v6mr8759553pls.131.1530253225134; Thu, 28 Jun 2018 23:20:25 -0700 (PDT) Received: from localhost ([122.172.117.17]) by smtp.gmail.com with ESMTPSA id g136-v6sm143660pfb.23.2018.06.28.23.20.24 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 28 Jun 2018 23:20:24 -0700 (PDT) From: Viresh Kumar To: Rafael Wysocki , ulf.hansson@linaro.org, Viresh Kumar , Nishanth Menon , Stephen Boyd Cc: Viresh Kumar , linux-pm@vger.kernel.org, Vincent Guittot , Rajendra Nayak , linux-kernel@vger.kernel.org Subject: [PATCH 10/10] OPP: Remove of_dev_pm_opp_find_required_opp() Date: Fri, 29 Jun 2018 11:49:40 +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 80fdeab4364a..722b3142f4c6 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 6d6b1febe068..fadf6d1bdef5 100644 --- a/include/linux/pm_opp.h +++ b/include/linux/pm_opp.h @@ -307,7 +307,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 @@ -344,10 +343,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;