From patchwork Mon Jun 3 15:49:38 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: 165652 Delivered-To: patch@linaro.org Received: by 2002:a92:9e1a:0:0:0:0:0 with SMTP id q26csp4647405ili; Mon, 3 Jun 2019 08:54:32 -0700 (PDT) X-Google-Smtp-Source: APXvYqy5rTS97TQbZvZ8t/HdBo5QxmHGsWwDxfSgV5l/kHFQpPOqDn3OERMUvLtHG+nYw4A/uWKN X-Received: by 2002:a63:91c4:: with SMTP id l187mr8129618pge.95.1559577272162; Mon, 03 Jun 2019 08:54:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1559577272; cv=none; d=google.com; s=arc-20160816; b=jeXg+y4jTpyCmN/slNt3L7eY5uNvkF7k//ZYvIpXkJhrtbGBe5mUTY+iE7JagwjPy4 U3blE8OgWN2y1E9a2EYmp0pii5NENYYeQrC5tGVALqkzpBL1aSW1f7GCHMdsCAFuunGt Qj0p2xSyXx/hqMJQ16FRJahy0NIjY+nhkmQwYOETIGyBZNcWe2eMyt1cB9YEIG72j/uE Wydw07CTUGJ7ZXAMKFPcIE9AjiIBoumOfxhQBjwk4VgQFxBy1hnEKoPbpqXQ1cd2OZVg /SyANvlioRngLyPAXFjgRWVBjTeLsEB3YfAI8bYM25K+XlVGssNduPDpbAfoK6TccOKA /K/A== 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=KWyFs4oa2UGCKFKC5sfTSD4h//1AVZMi1g2vXftxJtQ=; b=fRiBh88J4ZXWzXKzqIngShqx/1n4XrrpQpeM49YraCdKQcCIn6VJh3Tdfpsk7tv5hs 5i/fO6c4SoRQurXIwqWbMqVSdoHtIVc016ItKklHgCIRhZyla7loj6UgzleJ/WpfDll5 rf61vCrMxjJDrW4/kuhYEverfa8EzQsNOBhiN8iFXa5Vs4rn9JTG1Cyn+BcdWOfS0tMl LESeg+n451HMB9djNxck8sudQFLtq2jPtqLsuuIJ4aHw5Afivd7hNRijiAtLGC06vt+R RxG4MrkI9T/w7BXc2T2hq66cUBOj9CAlQfTQPEtNwIQfjq8EyLcz7BHYBZpdTv8PsMsC ISsQ== 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 k93si18106987pjb.33.2019.06.03.08.54.31; Mon, 03 Jun 2019 08:54:32 -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 S1728974AbfFCPvX (ORCPT + 30 others); Mon, 3 Jun 2019 11:51:23 -0400 Received: from foss.arm.com ([217.140.101.70]:53648 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728706AbfFCPvR (ORCPT ); Mon, 3 Jun 2019 11:51:17 -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 41B63169E; Mon, 3 Jun 2019 08:51:17 -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 D6A593F246; Mon, 3 Jun 2019 08:51:15 -0700 (PDT) From: Suzuki K Poulose To: linux-kernel@vger.kernel.org Cc: gregkh@linuxfoundation.org, rafael@kernel.org, suzuki.poulose@arm.com, Frank Rowand , Rob Herring , devicetree@vger.kernel.org Subject: [RFC PATCH 12/57] of: platform: Use bus_find_device_by_of_node helper Date: Mon, 3 Jun 2019 16:49:38 +0100 Message-Id: <1559577023-558-13-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: Frank Rowand Cc: Rob Herring Cc: devicetree@vger.kernel.org Signed-off-by: Suzuki K Poulose --- drivers/of/platform.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) -- 2.7.4 diff --git a/drivers/of/platform.c b/drivers/of/platform.c index 04ad312..b1e3a51 100644 --- a/drivers/of/platform.c +++ b/drivers/of/platform.c @@ -37,11 +37,6 @@ static const struct of_device_id of_skipped_node_table[] = { {} /* Empty terminated list */ }; -static int of_dev_node_match(struct device *dev, void *data) -{ - return dev->of_node == data; -} - /** * of_find_device_by_node - Find the platform_device associated with a node * @np: Pointer to device tree node @@ -55,7 +50,7 @@ struct platform_device *of_find_device_by_node(struct device_node *np) { struct device *dev; - dev = bus_find_device(&platform_bus_type, NULL, np, of_dev_node_match); + dev = bus_find_device_by_of_node(&platform_bus_type, NULL, np); return dev ? to_platform_device(dev) : NULL; } EXPORT_SYMBOL(of_find_device_by_node);