Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp4139277pxb; Mon, 8 Feb 2021 08:50:40 -0800 (PST) X-Google-Smtp-Source: ABdhPJwqF18tc5+Tq81RDmXw+MVkpRrDH9LmKCwK0Q88qa/KGdY0TBBCvFcT8/5XmsL3Thkbr9Ze X-Received: by 2002:a2e:a58b:: with SMTP id m11mr11034473ljp.152.1612803039775; Mon, 08 Feb 2021 08:50:39 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1612803039; cv=pass; d=google.com; s=arc-20160816; b=ZYRtDj0oUT6htb4sY2TbsrDZTcyQol8AYApNrTnYhWXQQ4loBjUfmkVhxbEhp8QVCL YitfbELZNjyfMrh6TvSkud7TedxTsHrvBNE32QCw/KBJikM7SInt35QpyIF+BX5NFmTi CfztLso2KjHycQLrcVN6pcH2ovsGrcpe5+Znt3pxsRvkgqWuXsM3owAj3J5EpI7gK9ry Pms0/dbPHx2nVZ2SzTykJpPq/vdVnoZ9J22Gyv3NmaiVYXsiQWfASFnno19TX29UvvXZ jYPp2EkoVa5EyBC+v2qCk9584WaAwxyV/Hze9xXqWKRTA0xskyG4aO+f+HqmERwNTfrV nWuQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature; bh=2V6s6XI0TYXSfjZLeXu1sqJNvc4lJnjwdeZllJubzK4=; b=erKCVkBP52G+X0Gnfxz3/dv28PdxbxvNekonq3fy8ePH1ghLABkN0zXSDtgYEktGwx wU4jSKeP7OTDB/VhiKrBNnn3zn0L47dpiAQ7es2Pjr/dGMuD05eSpSXqUU3gQASWHQDZ lh2/fc8oKqHmPAw+EepQIq7XWjb2HZV1mqO9XyCJPlvIybauafAcWDcnh8uTCWjbeGb7 jo5KCWJcaWnubnhPPupDmp5VLMSLd76ZQn9b+9BWxOxL0hCHpQmOEyPlcaYLriXGOQ/2 THUJYnzQiMNsvl+QtEMTdmNVXVbe69J9sw5YGirLlohHKRJhdN3jIp6dWCA4Zl5jt0f2 k4Vg== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@NXP1.onmicrosoft.com header.s=selector2-NXP1-onmicrosoft-com header.b=MTzoqcKZ; arc=pass (i=1 spf=pass spfdomain=oss.nxp.com dkim=pass dkdomain=oss.nxp.com dmarc=pass fromdomain=oss.nxp.com); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=nxp.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id r12si10487820edd.539.2021.02.08.08.50.15; Mon, 08 Feb 2021 08:50:39 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@NXP1.onmicrosoft.com header.s=selector2-NXP1-onmicrosoft-com header.b=MTzoqcKZ; arc=pass (i=1 spf=pass spfdomain=oss.nxp.com dkim=pass dkdomain=oss.nxp.com dmarc=pass fromdomain=oss.nxp.com); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=nxp.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234648AbhBHQrx (ORCPT + 99 others); Mon, 8 Feb 2021 11:47:53 -0500 Received: from mail-db8eur05on2050.outbound.protection.outlook.com ([40.107.20.50]:65248 "EHLO EUR05-DB8-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S233574AbhBHPQS (ORCPT ); Mon, 8 Feb 2021 10:16:18 -0500 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=DV1Yh8ZG68Ekn4hpcxorHNZXt02peaVBFXTr2azD/9RyWRsHZCQflR8h8aAd8+xSQkbYAsBtG5KknIyyYgmFWhEYhMqRGms0dBqsRA+2jDxqkyWaA68dUBR1ARRm3DVD/5bS1egARHxdi9N85iwYsSOFX+45jb8YIVSu+rSudoDw/Eja87F6dsxsTV2vVhFxJLRERWNI25Pbte3eIow7q4Ixblz7m/uNa3WWbwEC9yfW/AfuacDmuIGvXfNBVf3vFNPdNSJWdOZMHOtE/OmATs4gxk/hPoMZZAdOm8nAnPrDvoOH0sTHHZdf3yAmViDhU/7aG/Ui8dbnRTq3/B7p+A== 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=2V6s6XI0TYXSfjZLeXu1sqJNvc4lJnjwdeZllJubzK4=; b=ENoh1q66JpB3T3rLykSECCrAzNdjWlh+Hhec7TMtzsvTnBmzexIbUQ2xy8ncQbwz0uN5eoOR8URlrrfvcHedqetcVBq3f0Pati+4D9Nqmxi2hMZ3UItCRBa0GmUHnYRt3QRuZnS3ZVrWKsHbhrKAWOmvXFIEocwt0QD+lcvRjvzU/u7jykrJ8Bcspz0RJqI54LYahuV2n+sthLbhxpMiCzLp/KabPk3bLsorZfCnibU7XVbaqzJiIBrfmrhBY+p9+T4JlybQHdNOnI7giB1hlFZ8zfFM1t7Y6rz/kqXXrcgaG1ojGPFuzLr5AIl5coiGgliQBaRuxOWcdSH/QkPALQ== 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=2V6s6XI0TYXSfjZLeXu1sqJNvc4lJnjwdeZllJubzK4=; b=MTzoqcKZXOtZk3x3Un0eJnPPMmtf1acn+n48rdXtYhrzD9TFxlheZftDrGCfvcVoXwAygroq+6barliEOqKoujSHJyva5OwUQbKjZrAwVjts1uoBKUoAw1tqM3FsFHp5wUzJXBX48P97DNidcBUOZqXscU34B+6kFBI/tgohBcg= 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 AM0PR04MB6435.eurprd04.prod.outlook.com (2603:10a6:208:176::30) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3825.23; Mon, 8 Feb 2021 15:13:45 +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.3825.030; Mon, 8 Feb 2021 15:13:45 +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 Cc: Laurentiu Tudor , linux-kernel@vger.kernel.org, linux.cj@gmail.com, Diana Madalina Craciun , netdev@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-acpi@vger.kernel.org, Calvin Johnson , "David S. Miller" , Heiner Kallweit , Jakub Kicinski Subject: [net-next PATCH v5 04/15] of: mdio: Refactor of_phy_find_device() Date: Mon, 8 Feb 2021 20:42:33 +0530 Message-Id: <20210208151244.16338-5-calvin.johnson@oss.nxp.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20210208151244.16338-1-calvin.johnson@oss.nxp.com> References: <20210208151244.16338-1-calvin.johnson@oss.nxp.com> Content-Type: text/plain X-Originating-IP: [14.142.151.118] X-ClientProxiedBy: SG2PR04CA0176.apcprd04.prod.outlook.com (2603:1096:4:14::14) 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 SG2PR04CA0176.apcprd04.prod.outlook.com (2603:1096:4:14::14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3825.19 via Frontend Transport; Mon, 8 Feb 2021 15:13:38 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-HT: Tenant X-MS-Office365-Filtering-Correlation-Id: 0fcb7ab8-64d2-45b7-a301-08d8cc442088 X-MS-TrafficTypeDiagnostic: AM0PR04MB6435: 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: G8GyFoA4nP5CbwD/8d2G8jHeutTLH75D60er6Vioqet5ns7yLCI1YqDvfZjsfKztNu+387saheRi7mKL0fUAVApPtFuOHu4P8WEvJJuUIhepMAxHi7hed2EP4ixHXyYqWbKhFJS9flmsJaedtvu+Yr2LG5bQAEyHVjukoBh6DjQWk1PGodk3jg+WNIlI3kr/GfLkuGRRUeh11CBz6sAeRZC0DnuzMUZCx5n+LxInns3+maz21UtwB6kAwaEzL10/CuyZayXva9H6Uu7k9MAiveQOenYRk7mNuCRoyCQ9v+CTnzu1COBGH4sRzilVhKFw0RU9iP/DiOvT0vyZAJfka5BVKAt3lmLcEMR1r+w1oK8KKroaxYjNuy5K54gLdRhgohCuOxuh7AcEbFC+kgvOEGjhmcemk5Zl6dzWx4KWqTauiweH3prRV2J7fUdUo5Tik6f2dTkhiQAqevdLwOM1YVX8a5YxUj+GE25jNaswxFw9WJeT7xJyEDPXmkKcA0Qttzm3UUsnR4IwagiOu08NytnUoevEWfOMY1m2cnWhqAY2WEsEAFY3c8Y8Yy2bzE+lXCMlZ5w+YVlee1OcF29Iow== 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)(39860400002)(136003)(376002)(346002)(396003)(8936002)(54906003)(7416002)(52116002)(110136005)(186003)(16526019)(316002)(55236004)(956004)(6486002)(6666004)(1006002)(4326008)(2906002)(478600001)(6512007)(1076003)(4744005)(6506007)(5660300002)(921005)(44832011)(83380400001)(86362001)(66556008)(26005)(2616005)(66476007)(66946007)(8676002)(110426009);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData: =?us-ascii?Q?uaf8iccntK9P968IgHiY5LnC7D1zxdFj5jsOS0OzJaAUSfwzq1KzNwBdxMhV?= =?us-ascii?Q?NG8Fqm9HsQChcToma4UvSpcJulB56UH8TuJwzKDs4GBPQPp9036sdL8D++aJ?= =?us-ascii?Q?fqbdhSQIAjZSd0UKKQtU+18IPbFFuHir2SE8xXuledQQ+lsk5l4tklJpprpJ?= =?us-ascii?Q?VzclMFh1wuL1BMASnfHAgGg4V7kjTpRDn0T3Q924NvT5qTHAwbX0X+Ao1ukH?= =?us-ascii?Q?LivK0+KOs6HPbMabbBZppFuLJqXZBwWZGFXYVSo37bjLlM5BsFTII1+T4eMa?= =?us-ascii?Q?wP6KqaPCnkAFyGRP1gc6os9j/PwXWx6st87wi/JHjXryDVQmgoOyPnSBNQIJ?= =?us-ascii?Q?Adw5vWGGyFU8VFGDDw2XarObI5QB9QcBXElh6Dlp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9S/mYKsKuw9JjfnTXihHdL7vfIV5HqCe8YUguZgHo+z60S8YPX2veq?= =?us-ascii?Q?0nwj3iUZigd7UiVUfg6KKT6T?= X-OriginatorOrg: oss.nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 0fcb7ab8-64d2-45b7-a301-08d8cc442088 X-MS-Exchange-CrossTenant-AuthSource: AM0PR04MB5636.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 08 Feb 2021 15:13:45.6748 (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: ppwNg/04Bbi1ZwA7jVMesayP0vnmYH+c/08+8NKzCIMQ5FbWcrfLdd6iuAfQLoy4ja2NKrL06DO/mPSCex3HYQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM0PR04MB6435 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Refactor of_phy_find_device() to use fwnode_phy_find_device(). Signed-off-by: Calvin Johnson --- 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 7bd33b930116..94ec421dd91b 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); -- 2.17.1