Received: by 2002:a25:ab43:0:0:0:0:0 with SMTP id u61csp4316918ybi; Mon, 3 Jun 2019 08:57:24 -0700 (PDT) X-Google-Smtp-Source: APXvYqzphJ1xyczMgcWaV7TKfwfVH/OyA91vyjy+jnR4ThnVwGb+5hBNlwvH/yo703mEKoLrcaXU X-Received: by 2002:a17:902:a98b:: with SMTP id bh11mr5173174plb.8.1559577444673; Mon, 03 Jun 2019 08:57:24 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1559577444; cv=none; d=google.com; s=arc-20160816; b=rJeBUXEucB4ufbxZjFFlCg84LuLerj9FqFrncInZRelNjWh3Kf2JitRsmuLYWnTbJp R6xufOMyxzgL8DMbgLggc4hzxV9lccA3YDW4OIGvw3aXBKTl57+FPZK+OgQTrLA6gNf+ B84fDzp0AdATcXLvBqKyC+/Qq+seipEvtNUM+78mQs0kQeqb/tvsfTifM1FWx0CUt5+w KJk0Ix3Gj7XNAv88Cc/IX4UbDxZWgqmBgUSm5jL+03yhuKIHrKMI6UU3zg0Vy/yyqbAs Q52w39JLguOVtBnQ+tcPHmxO7ps+W0wreRi1blyXu4FclnAMMeE3xjLCLC+lL1R5BJyO rSMQ== 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 a17si18704881pgb.25.2019.06.03.08.57.08; Mon, 03 Jun 2019 08:57:24 -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 S1728951AbfFCPvW (ORCPT + 99 others); Mon, 3 Jun 2019 11:51:22 -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(-) 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); -- 2.7.4