From patchwork Thu Feb 18 05:26:43 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Calvin Johnson X-Patchwork-Id: 12093093 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-16.8 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,MSGID_FROM_MTA_HEADER,SPF_HELO_NONE, SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 5D3B4C433E0 for ; Thu, 18 Feb 2021 05:31:43 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id E6FC960238 for ; Thu, 18 Feb 2021 05:31:42 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org E6FC960238 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=oss.nxp.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To:Message-Id:Date: Subject:To:From:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=0y4nj0U/QqYW8hCzaDl78jNBmybKuTkZ4y4WjbJmeiU=; b=XV8HpdmbKV2BYg1hGI7Yph8La iS6uKR0vtMEw9pY00NOjvjgUlT1BB1MiDut3sKwlTd/RmjQhl4v0xqsGONqtyAsmheKm889EaIQWp 7jupBKW534Pg7Uq603JTv10o01ZUnJHLsGqZtZmKx/+hJuMmExV/RU0n6w8+ssqHSnADsVEVcLQU2 7ZdyII5o0JjAD00xA3yF1gCrhh1qaidFihYp6zL5egCGFKIQxagvGbnLjHJIvWXQO/9QjgCrsnh+Y rTjlrgSCp8/XdKImSIaFiK2ykZO1KFbhh5k+hvLny4F5swgc5a4rZbmUGhzmwPOPwyhbo5wyuAwlB KMwm8KAVQ==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1lCbr7-0007sc-9V; Thu, 18 Feb 2021 05:28:01 +0000 Received: from mail-am6eur05on2052.outbound.protection.outlook.com ([40.107.22.52] helo=EUR05-AM6-obe.outbound.protection.outlook.com) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1lCbr2-0007qn-Nz for linux-arm-kernel@lists.infradead.org; Thu, 18 Feb 2021 05:27:58 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=RgiNi1TEn//AwStoinNWKxES6ItgJ/qpJl8keZJTPPZ1mbCjE2J0Jb0b9yR++V8ea+972Unz7szujBwKcyUJpq006GvqiQBVC383Q9co/SQGWv0iopifaZFhDDtAozrpZ4vQJvwlPe91cY+YPLbq82/i/PJvH/lwLS7tns+JvncMmEIGjjEzfafc5KiAmtZqk5qoKkWGCrGoAPmXZIhWw53f1eYZ/dYtG1s56Hy/8NJQg4trbLz7pi6u7FxsD6EgQVO/ay3Op/XM56kpg0QM/Zp/p/AIwaiuUSrr5YupA4Z1ueAysIUGUwaoSeMyQxLNwh69ans6Vu9+BYnAFn571g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=FB10n7oLpBWfXMHJ4Nhx1CrW3M+j/hH7J5WQQidIr2E=; b=hh00wJ5LmBX8Yx5cQfTCU+ElXzObFmYy1uAuUaG0g5Q9BWpZKKDIbjNxL0JTQFM0fj1D97+XFZH8RAQFEJLp7qNpIlnwUXfv1YUBXK/6yFsE7Ghy5K8R38L8mCa8yud/NBSVQMMAhMk1RGlQ84njXww9jgiPBxCDajvZOrOt6n5pL8jxtTw6nZz14PveGHNWU7MoWE+b2p5XqZZ4BA1zdMz3hqsGUm45QIFN5exIJpMeyFromfsJPDMDADp3R22FcJbvY0bZPQ1pqH5DgtAKT2UsUb9du/ZTzZb3ChUaJy06AJpHknCF86ZLWSa7XkyW4I4tk/Qz+E3oMzyrnMX4sA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=oss.nxp.com; dmarc=pass action=none header.from=oss.nxp.com; dkim=pass header.d=oss.nxp.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=NXP1.onmicrosoft.com; s=selector2-NXP1-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=FB10n7oLpBWfXMHJ4Nhx1CrW3M+j/hH7J5WQQidIr2E=; b=DYWAqA/2cuDqzQsnhKPpZSqTo1fq7ENTsLnq57ClPPBlf6ySpImHu1t/rMgjb4iHocl0pCzAMlYHF2tVtHOFEEkCRJRV8u6CxwtxXir/6yK4/gSlrj85F/DVn/ER6VFcezvpPqpm0jJxK3wYwToLoF1b0mu3gI+2HxG8AYAcRWw= Authentication-Results: arm.com; dkim=none (message not signed) header.d=none;arm.com; dmarc=none action=none header.from=oss.nxp.com; Received: from AM0PR04MB5636.eurprd04.prod.outlook.com (2603:10a6:208:130::22) by AM0PR0402MB3442.eurprd04.prod.outlook.com (2603:10a6:208:21::30) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3846.42; Thu, 18 Feb 2021 05:27:53 +0000 Received: from AM0PR04MB5636.eurprd04.prod.outlook.com ([fe80::e90e:b1d6:18a2:2d42]) by AM0PR04MB5636.eurprd04.prod.outlook.com ([fe80::e90e:b1d6:18a2:2d42%6]) with mapi id 15.20.3846.042; Thu, 18 Feb 2021 05:27:53 +0000 From: Calvin Johnson To: Grant Likely , "Rafael J . Wysocki" , Jeremy Linton , Andrew Lunn , Andy Shevchenko , Florian Fainelli , Russell King - ARM Linux admin , Cristi Sovaiala , Florin Laurentiu Chiculita , Ioana Ciornei , Madalin Bucur , Heikki Krogerus , Marcin Wojtas , Pieter Jansen Van Vuuren , Jon , Saravana Kannan , Randy Dunlap Subject: [net-next PATCH v6 04/15] of: mdio: Refactor of_phy_find_device() Date: Thu, 18 Feb 2021 10:56:43 +0530 Message-Id: <20210218052654.28995-5-calvin.johnson@oss.nxp.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20210218052654.28995-1-calvin.johnson@oss.nxp.com> References: <20210218052654.28995-1-calvin.johnson@oss.nxp.com> X-Originating-IP: [14.142.151.118] X-ClientProxiedBy: SG2PR02CA0051.apcprd02.prod.outlook.com (2603:1096:4:54::15) To AM0PR04MB5636.eurprd04.prod.outlook.com (2603:10a6:208:130::22) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from lsv03152.swis.in-blr01.nxp.com (14.142.151.118) by SG2PR02CA0051.apcprd02.prod.outlook.com (2603:1096:4:54::15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3868.27 via Frontend Transport; Thu, 18 Feb 2021 05:27:47 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-HT: Tenant X-MS-Office365-Filtering-Correlation-Id: 1f5ddced-5849-4f40-9c36-08d8d3cdf0a1 X-MS-TrafficTypeDiagnostic: AM0PR0402MB3442: X-MS-Exchange-SharedMailbox-RoutingAgent-Processed: True X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:2449; X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 4mry8Y8p8oE0SqQgntNkt+kb1QDPYRBr/De010ik7pYf8ILPyPLIRCYDh1nM6wJGE3gcsUjDbyjtnxGbYMt+PSRN1oe6TtrjjuQA4ryZ3CIU3VVYAOt8MOZnDXRjUV2tc88MHIoUlf17GMErOg9wsW+nubMATyepCa0GkGm7IIh0n4F9RBuLyfqjAHc5E0xAdegsZUPopuF1V+Vif3C6g5TYR4m3vaTNC3R/gJqJ1zrlAwESx1/DBCiQNItJyLZXA+RUjzAnnVJ70xNRpweZ2XSP0+ReKTD3625+ydI8pgOqJxPgakylzFztW3QF9du6W+LuZ+O8JSNN9BCSA3w5/lnIkpBsOjRzzVM9hB0J8n8LsDdPgj1sqNb219gvEoWo1w8ECk0HWDNBI550zjEDXaNOwaG+3iS7R0s2mJp+7gQGGJHBMJK/eKXfy6fmZRCBjrT+VLF8OXqJC0JuMqeGdRnuV6mirfcd8kq5IQhOfsxOhUWwuK21n3yFaiFQzNRhELsa24vv7yJgr2BtnTBI4zt010T8evx/DVAsdbEujCGhdwFBeem1Hsn/rb1gC9+SHwg7NBi6t6KnDwV8eT4Tmg== X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:AM0PR04MB5636.eurprd04.prod.outlook.com; PTR:; CAT:NONE; SFS:(4636009)(366004)(346002)(136003)(39860400002)(376002)(396003)(44832011)(6486002)(26005)(7416002)(16526019)(4744005)(110136005)(956004)(2616005)(186003)(55236004)(83380400001)(1076003)(6666004)(4326008)(316002)(1006002)(54906003)(8936002)(5660300002)(921005)(2906002)(52116002)(478600001)(86362001)(8676002)(6512007)(66946007)(6506007)(66476007)(66556008)(110426009); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData: qbQ45Dfhvx06+bdcgk2Nom2k4XdFr2EzcIwFOR8GBeRuMgmv8yNu6z6g6IPm1MugHqIYSv33STX/AlHIiYOlXgXUIUixSvLsI1CbkFwkY826QZaXGh56TJRbCWhqpVnR38GHqB83xEGMeQprPr5J0uS5s4CtBhNJr4D1WQ+CxRpfkmrBf63cw2BouSKUyaUgl3p0k2rZttFBCDI2SmnvfyxOzRUqnxhQgFqPr8XPQ5qv0/wo5wBPf/OeHeTKZ10rrMnUJWKcY2VB9XzlW9xt6/uYvDNeLUmUTwUt6V82ThTc/AhzyXd5+Pq7cbQrAPrbH7A/ZUJAeGI0bqUB2d3a5XRArMnADIx1t3Yu205DMtauJoFvYluEjenivKrI6sMIHrnmr2F2vhfG2RcOzMfM8I95WG+9zQAGsaD7q9hbd5ASLo9vkr7jwKh37jdsaqCkzQovtdNjSJpzyQHmf+6e6EvAbONssVnwJEf9TXtM70MB28JnYFBYB2SwDgR6M2wYjV6xEl7B4XK3cmziZGpvTiWt85RXiqMMjc+NRBJO1qSmgncFWpuNFDZZTIu18LQ+jwN0AOam0O0wGjQAUE1wJZZDz2Ruk79ndtc5qI/QJaaap5+DKTW1H+gGSujU9sndzfClBgGdJq/cBECiIBE81+n1EBsO8yVjhRTV9JrE4VF8DiltyKkDckzQclYOXyVpt/HrZM7JM42l0ye/UDrLYBleLv2J56R9c9Kha3qmTYDGVAlDAS6PhkR0nCN7GP1uK6kHrNrGr0p7yc5szp0YMwWjvvdcW4y8xzhD4yI+I65CwfVQ+YQeQa7s2t4iX87XnYPWjd4QbNrkgqKOIaLKruVQXVxWGfyv+bcU94eosqcCusRcUcFg+LZyNvyVwxWSnlTgq5gYpDjbdTXIvfhBRZiisWmksfYoOQrUi3XURloh0Mjf9TgqgLOQ0DiBhA0/qzh5q+m2DDDQhB4THok0UeRN1rCyIxYW/ox6WsEAbWyuJMqRCnUUvMulOazTcqddnRLbv0h30/ke8RUbNQxCxNlxUBs6z1FVDTHHJ5quCeodWRi5kuxT4zsQpkYdf/5tNHY8w9ttzSDZMxyMWzpqqxiTjOwhAiv4jlJgrMv1+CI6WueH+WoF8+eLzOkI3/G/j4u7RBYqAI7FrXgqj7Wp/Uf0pQMf7bQuyaeZh4v+kPSi0znIX3BdeEEvT5WlyVk6URKLlFPbQXYXln1+7n7CfpD0Xz4WtTpijT4uumqkfqDaMdPT6pwNS0tMmRoVn/D4RfwBrWmmZQH9Y8YmiByPfuPzL4pYC9UU89dffnykIV5lszMljAdQlutMnc/yYfG0 X-OriginatorOrg: oss.nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 1f5ddced-5849-4f40-9c36-08d8d3cdf0a1 X-MS-Exchange-CrossTenant-AuthSource: AM0PR04MB5636.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 18 Feb 2021 05:27:53.8171 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635 X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: bBJAGxXYL/dFT32D2zIhf1lwMydnKmbWDi7MgXAyG0kXVcM2urIkYbfH4QFSplCunQXYvmZFQMv+CBUUxocFTg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM0PR0402MB3442 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210218_002756_923118_74F4FBB9 X-CRM114-Status: GOOD ( 13.87 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: netdev@vger.kernel.org, linux-kernel@vger.kernel.org, Calvin Johnson , Diana Madalina Craciun , linux-acpi@vger.kernel.org, linux.cj@gmail.com, Jakub Kicinski , Heiner Kallweit , "David S. Miller" , linux-arm-kernel@lists.infradead.org, Laurentiu Tudor Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Refactor of_phy_find_device() to use fwnode_phy_find_device(). Signed-off-by: Calvin Johnson --- Changes in v6: None Changes in v5: None Changes in v4: None Changes in v3: None Changes in v2: None drivers/net/mdio/of_mdio.c | 13 +------------ 1 file changed, 1 insertion(+), 12 deletions(-) diff --git a/drivers/net/mdio/of_mdio.c b/drivers/net/mdio/of_mdio.c index d5e0970b2561..b5e0b5b22f1a 100644 --- a/drivers/net/mdio/of_mdio.c +++ b/drivers/net/mdio/of_mdio.c @@ -360,18 +360,7 @@ EXPORT_SYMBOL(of_mdio_find_device); */ struct phy_device *of_phy_find_device(struct device_node *phy_np) { - struct mdio_device *mdiodev; - - mdiodev = of_mdio_find_device(phy_np); - if (!mdiodev) - return NULL; - - if (mdiodev->flags & MDIO_DEVICE_FLAG_PHY) - return to_phy_device(&mdiodev->dev); - - put_device(&mdiodev->dev); - - return NULL; + return fwnode_phy_find_device(of_fwnode_handle(phy_np)); } EXPORT_SYMBOL(of_phy_find_device);