From patchwork Mon Jun 3 15:49:37 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: 165609 Delivered-To: patch@linaro.org Received: by 2002:a92:9e1a:0:0:0:0:0 with SMTP id q26csp4644127ili; Mon, 3 Jun 2019 08:51:23 -0700 (PDT) X-Google-Smtp-Source: APXvYqyZxtARHTw/ukEMnSisKjwuFgHnEJPjIOSNWhiNhI48n0/SjDGY52ABk05P96VNFupIhj+w X-Received: by 2002:aa7:82d7:: with SMTP id f23mr31652931pfn.138.1559577083045; Mon, 03 Jun 2019 08:51:23 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1559577083; cv=none; d=google.com; s=arc-20160816; b=WusXJZ7gMy5t4lbnmPNHwNyEymqIz4yUPg/k0HABSsK+OFD/0zzjjLfvntT/t+QXcy /3f4bH/c76/L3OizYPZM27Se9Qz+nLl0miAuArDZ0SrHdbjzxA/pXSww4uzl8SEmIys2 s10zS8hZeGhSHsDVfe0tVhxPf3lnWGd19T3enR+vg0ARiQZXKmrAmcA+qzx6NRC9VqJm SGrLg8Na5ftef9New8zzbckOJFITWagIyDtr+15/MCl1GLUI7j8C79MCx2LttY9Umw3C ryUWcHFBY7vL+zQ3no9xCKumXAcQDoD7Rg2fTwabaRssnBokZFQptC90RaKCmX31yinZ M84g== 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=HhM8wxV7mHXh/FL4YPtoV+1hNjiQKLVL5B4EJjcjXEU=; b=FNwc1RzapUvpK4OOENfhYC+MGsQ8XxvNAVeMKvSK+f23AvCb9L41MYilHscjJCBCXK VALQe4U4gQWYgbt/4Y5Zvq9/HP9nkJXQTftBFNLk3yrqnf3QFD+fZ1LVU1Z17evcZTXq U0u5ygxXMm6GZSB/X1eqTL0BDD9EzMjwRCepo/NK8ApQtmP41S/s9d88bsKdfGY4WH8l P80E/gfu8iboxYJctfsYD8dzviRtRm+Ug5fKdmK4LkPPzuiZ6IPllVdMZuK8dGD7B8Ee PZoGw2UEX8SIz73RAgaGczYONC5rU571zPBLaJtkgNI39IkURhTijTvh/kbixSdQPVC4 RMgA== 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 g69si20591014plb.70.2019.06.03.08.51.22; Mon, 03 Jun 2019 08:51:23 -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 S1728902AbfFCPvW (ORCPT + 30 others); Mon, 3 Jun 2019 11:51:22 -0400 Received: from usa-sjc-mx-foss1.foss.arm.com ([217.140.101.70]:53634 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728654AbfFCPvP (ORCPT ); Mon, 3 Jun 2019 11:51:15 -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 99B5615AB; Mon, 3 Jun 2019 08:51:15 -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 170493F246; Mon, 3 Jun 2019 08:51:13 -0700 (PDT) From: Suzuki K Poulose To: linux-kernel@vger.kernel.org Cc: gregkh@linuxfoundation.org, rafael@kernel.org, suzuki.poulose@arm.com, Andrew Lunn , Florian Fainelli , Rob Herring , Frank Rowand Subject: [RFC PATCH 11/57] of: mdio: Use bus_find_device_by_of_node helper Date: Mon, 3 Jun 2019 16:49:37 +0100 Message-Id: <1559577023-558-12-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: Andrew Lunn Cc: Florian Fainelli Cc: Rob Herring Cc: Frank Rowand Signed-off-by: Suzuki K Poulose --- drivers/of/of_mdio.c | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) -- 2.7.4 Reviewed-by: Andrew Lunn diff --git a/drivers/of/of_mdio.c b/drivers/of/of_mdio.c index de61573..f15cf8e 100644 --- a/drivers/of/of_mdio.c +++ b/drivers/of/of_mdio.c @@ -281,12 +281,6 @@ int of_mdiobus_register(struct mii_bus *mdio, struct device_node *np) } EXPORT_SYMBOL(of_mdiobus_register); -/* Helper function for of_phy_find_device */ -static int of_phy_match(struct device *dev, void *phy_np) -{ - return dev->of_node == phy_np; -} - /** * of_phy_find_device - Give a PHY node, find the phy_device * @phy_np: Pointer to the phy's device tree node @@ -302,7 +296,7 @@ struct phy_device *of_phy_find_device(struct device_node *phy_np) if (!phy_np) return NULL; - d = bus_find_device(&mdio_bus_type, NULL, phy_np, of_phy_match); + d = bus_find_device_by_of_node(&mdio_bus_type, NULL, phy_np); if (d) { mdiodev = to_mdio_device(d); if (mdiodev->flags & MDIO_DEVICE_FLAG_PHY)