From patchwork Mon Jun 3 15:49:36 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Suzuki K Poulose X-Patchwork-Id: 165654 Delivered-To: patch@linaro.org Received: by 2002:a92:9e1a:0:0:0:0:0 with SMTP id q26csp4647571ili; Mon, 3 Jun 2019 08:54:42 -0700 (PDT) X-Google-Smtp-Source: APXvYqyoJNEU08d1WYQQN5mrPvTGHsZo6/Ji7x/1ebDLGK1jF0VTlZUB4nfXfs3aI7StMpsmkWRg X-Received: by 2002:a17:902:205:: with SMTP id 5mr28850642plc.165.1559577282098; Mon, 03 Jun 2019 08:54:42 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1559577282; cv=none; d=google.com; s=arc-20160816; b=tFn/xKkgeV3KX9WoQNJWlQw+EiNAByH5vZUjdELZuxEFKbsq2uBITg+oTu3wuivfFI C5XUWcJ3F4ytcdk1byH606/E/WcLMaFTqho93YrYgp8Zw3kDtluTbaywdjLp61yo71RJ qz61OCLFnXGe/qvHbqS1dbveR8xpCa8G2Xv3bHo9FBEbKvaeLokIlMvmcAEvUPSWneZg FJrRWrimACcBk4QOrkb1GsK3VOEly0FCfylMdpPqmCANCiD8yD8lRty4Rf8XG8QVlm6v y9L4OWiWLEE5lw9woCoiRS2w8lOZzJr74lBL4ISx2bGdaLmmjjfj9D5hXdeSSn2Pd7+D Rg6g== 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; bh=v6skjzbTU+wQbrUOgsz6jlP9lia/Qx9uX4clcb5SJiM=; b=ea3GLG2r0rrSs2uJRtMo3HDvvl6tWCnS/O4OsLSXQ08s215MPLNGerKvDwrJcqyK23 R5gIYtmzeww/dkk5ptXbmXTXyEA0VNNoyKRMno1l+3j+aiHimK5HL3XQd0r+CUJS/ime 3SOdyVEGBpp1vkrDfvlbl5PLSyU84jXcZVMvlI285IkVQerz5z9kjMgZQQf2Z+t1KBc+ N11TKeLYldZm07HIpCMGKIOFf1EQRGmQyR+vnKSJUcbp+zI9LicUHOjGz0tJmfIO7gwO nRnu3OTk9uXycsT1jLrOmPyPlH9Rp1eT9FP7zUgyckVVUq4CkZDGC7fsGDc1IxnbpZO+ XiCQ== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id j16si20062568pfn.225.2019.06.03.08.54.41; Mon, 03 Jun 2019 08:54:42 -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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728821AbfFCPvV (ORCPT + 30 others); Mon, 3 Jun 2019 11:51:21 -0400 Received: from usa-sjc-mx-foss1.foss.arm.com ([217.140.101.70]:53624 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728589AbfFCPvO (ORCPT ); Mon, 3 Jun 2019 11:51:14 -0400 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.72.51.249]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id CE1A8169E; Mon, 3 Jun 2019 08:51:13 -0700 (PDT) Received: from en101.cambridge.arm.com (en101.cambridge.arm.com [10.1.196.93]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPA id BEF183F246; Mon, 3 Jun 2019 08:51:12 -0700 (PDT) From: Suzuki K Poulose To: linux-kernel@vger.kernel.org Cc: gregkh@linuxfoundation.org, rafael@kernel.org, suzuki.poulose@arm.com, Mathieu Poirier Subject: [RFC PATCH 10/57] drivers: coresight: Use bus_find_device_by_of_node helper Date: Mon, 3 Jun 2019 16:49:36 +0100 Message-Id: <1559577023-558-11-git-send-email-suzuki.poulose@arm.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1559577023-558-1-git-send-email-suzuki.poulose@arm.com> References: <1559577023-558-1-git-send-email-suzuki.poulose@arm.com> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Switch to using the bus_find_device_by_of_node helper Cc: Mathieu Poirier Signed-off-by: Suzuki K Poulose --- drivers/hwtracing/coresight/of_coresight.c | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) -- 2.7.4 diff --git a/drivers/hwtracing/coresight/of_coresight.c b/drivers/hwtracing/coresight/of_coresight.c index 7045930..9b7a0c0 100644 --- a/drivers/hwtracing/coresight/of_coresight.c +++ b/drivers/hwtracing/coresight/of_coresight.c @@ -18,11 +18,6 @@ #include -static int of_dev_node_match(struct device *dev, void *data) -{ - return dev->of_node == data; -} - static struct device * of_coresight_get_endpoint_device(struct device_node *endpoint) { @@ -32,8 +27,7 @@ of_coresight_get_endpoint_device(struct device_node *endpoint) * If we have a non-configurable replicator, it will be found on the * platform bus. */ - dev = bus_find_device(&platform_bus_type, NULL, - endpoint, of_dev_node_match); + dev = bus_find_device_by_of_node(&platform_bus_type, NULL, endpoint); if (dev) return dev; @@ -41,8 +35,7 @@ of_coresight_get_endpoint_device(struct device_node *endpoint) * We have a configurable component - circle through the AMBA bus * looking for the device that matches the endpoint node. */ - return bus_find_device(&amba_bustype, NULL, - endpoint, of_dev_node_match); + return bus_find_device_by_of_node(&amba_bustype, NULL, endpoint); } static inline bool of_coresight_legacy_ep_is_input(struct device_node *ep)