From patchwork Tue Jan 12 13:40: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: 12013517 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=-17.0 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 5231EC433DB for ; Tue, 12 Jan 2021 13:44:26 +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 EF0EE221EC for ; Tue, 12 Jan 2021 13:44:25 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org EF0EE221EC 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=Gou/DsX9kdEca1ttzTHTOT2CEf7Xv0GYMHQ3bUrRj1c=; b=KdQnWTfy37tb9ZeB3u4SPnhDV iXTZjzWyKkYcbw96zaaakdEoEG6TgLbs7NuJuXHazurzmCfZDJviT5RozXn4jJgjOuqj2VeNJm4sN kG39+SUOThhjutIKVKGXt/rCmWxVjAlMBwzU2hcGr0Ek3OzEjlMoTSpKd7ij4PxxJSlyfGi/l4rtv hFsxeMBGFDH5htuIMqoRH3IEKZgnRGGfzXEF7n21LvosPjFYGRyfcOPVViwFLqKFdrTx73+OQxlK+ UF6W03GmjU/7PTMfVRdoplsQOzk+sflAgmSHC1BHKBh2ovO7ptQYZd6aAAlVIC8AQ3K9Zo2bEIjxm XzU7BU12g==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kzJw8-00004t-HQ; Tue, 12 Jan 2021 13:42:16 +0000 Received: from mail-eopbgr00059.outbound.protection.outlook.com ([40.107.0.59] helo=EUR02-AM5-obe.outbound.protection.outlook.com) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1kzJvt-0008RX-O2 for linux-arm-kernel@lists.infradead.org; Tue, 12 Jan 2021 13:42:03 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=RptJw/x3iK0+LUVz8GR0loPHMeik7BWHXb51t/80wjoFRh1FXlI5rDc05ntLRMpueWYH6Ahe8ie4DaRzTruqrONuKysSr0WtqONbY3ip+jX2Bx/PWksEXfSC0wSwx5RCEm/6i0RzKtznq8Rq8Nyjuug44Z12ZZV5RqefD+8GUk2ndzrv8vfjNBUhO1w5t0o0LC2GlrBTQlNiqc6pP7T94pkH2XELM112QENyq/JhkwcwqAJ4UsnKbTxzGGF0q2kaWtZch/L6j+tPdmMHmnUkd/b6JaRU1Yg9PWQGP1vRh/SlDulC5PIFVwrBIos1K6uCKGcHTWnPZ1oHizXfIF8Kfg== 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=W9F9yZ8Ze53QqqBBVeIkf8/Lnyv/w5MBJCzNaUfT1Wk=; b=i1X5KSKoLQn7qIjHNPUvRresCnu70QxJWls/+O29JhSyO/mLsjl5HksDqnIPnqkcSude53QnFBQIxiEML7fgYK7nAlnXbVt7/1OToppa1aD8pJo0JnO7nY6KAU09CJbg5u+PhZc1JXBysgj8oBBl8aoKtaqNCMWWvbhKwx6WNFb9TfWIn8NivSoBBl1Ad178wVyHEaFb1GF/AmV2JUyWeVi0brvsln03qUt8JiqZyR5Wd3QKpwEvR0QhDvMk6QmUvdRA9WbPKbLZBeQD17mDe4ovsffM+s1Xi5sj6w4txHu9DJtjxeXYo27/Gn1PibM6L5aKNP/+rkt2ZRYlt0me4Q== 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=W9F9yZ8Ze53QqqBBVeIkf8/Lnyv/w5MBJCzNaUfT1Wk=; b=azDlMxMHhzBFxgeahMw+u22X8lSmFYSVR5y1TuKCNLJ2WPhx+EX7BhhhnVYiyI+bimyvD0rvPsydmSDpNFPUb7Rxk26gzJQPpi1iowf/M+0wF+u33CZmcceOvksT+K0NOSSjw7uaReTJ98G6DuLUpOVBslXws61jPXN+duJ3Kdg= 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 AM0PR04MB6436.eurprd04.prod.outlook.com (2603:10a6:208:16b::18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3763.9; Tue, 12 Jan 2021 13:41:58 +0000 Received: from AM0PR04MB5636.eurprd04.prod.outlook.com ([fe80::a891:518d:935c:30dd]) by AM0PR04MB5636.eurprd04.prod.outlook.com ([fe80::a891:518d:935c:30dd%5]) with mapi id 15.20.3742.012; Tue, 12 Jan 2021 13:41:58 +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 Subject: [net-next PATCH v3 04/15] of: mdio: Refactor of_phy_find_device() Date: Tue, 12 Jan 2021 19:10:43 +0530 Message-Id: <20210112134054.342-5-calvin.johnson@oss.nxp.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20210112134054.342-1-calvin.johnson@oss.nxp.com> References: <20210112134054.342-1-calvin.johnson@oss.nxp.com> X-Originating-IP: [14.142.151.118] X-ClientProxiedBy: SG2PR02CA0047.apcprd02.prod.outlook.com (2603:1096:3:18::35) 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 SG2PR02CA0047.apcprd02.prod.outlook.com (2603:1096:3:18::35) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3742.6 via Frontend Transport; Tue, 12 Jan 2021 13:41:50 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-HT: Tenant X-MS-Office365-Filtering-Correlation-Id: 58a6ad76-afed-4198-f4a4-08d8b6ffd563 X-MS-TrafficTypeDiagnostic: AM0PR04MB6436: 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: w5g8eneNNFMD04cOz0tkXL4S8y87nz+a6kmqmAAyyq4ZmPDz50qe5UPw5ojwdF6JteSExQGX/gbSqmfdWXkYtkp4e6XHpK4d0TByHpOjLGF3cUy6gx5m72qaJuAne59lh6pTHOfKnAJcVzimz20WpY1DfyEVwWPBvZPjWIyJFIDvGN4FKPsriO6bV4PHmkThqn6o10OuC+B0Srf1O21zdJT3xXj4VKGj3YTxSFhvzpbKmSqaXM5vWWkjcGWiCTVEl6puWGZP+0bBxcQNj8t+7cCSSqDq75H11aGYBKsE40pUNIW0un2ECYnR5om9icw4vh3ntgNT+D2eCmfyIEl0cHNMrnjnrCl+JmU1Wgf+oD6AnGotSeomRR1aPEM+uvZIrk/CppsfoRccHIQ+fTz92ATEAtj3y5Dj8xH/cumyI3dqGh1OlaTvBofXv5DQp0KzLET4weT+mNQpJjET2V/rXA== 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)(396003)(136003)(346002)(376002)(39850400004)(366004)(4744005)(8676002)(956004)(83380400001)(921005)(6506007)(66556008)(478600001)(66476007)(66946007)(6486002)(8936002)(55236004)(26005)(2616005)(52116002)(16526019)(44832011)(4326008)(316002)(5660300002)(1076003)(54906003)(2906002)(186003)(6666004)(1006002)(86362001)(110136005)(6512007)(7416002)(110426009); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData: B+IUVBDX7VbuSMWKELXrvIgQ0BKnhB3eGAx6TGF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As: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 12 Jan 2021 13:41:58.4419 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635 X-MS-Exchange-CrossTenant-Network-Message-Id: 58a6ad76-afed-4198-f4a4-08d8b6ffd563 X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: /qkZIHxChpDC5RssiWw9gEW42OB3myj4ZH/YLS1p+I2pfNd9Kz4lnV9OjHvLJVh1CHKLgTo0arDQnjoyWXKeHg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM0PR04MB6436 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210112_084202_879208_6771E8DC X-CRM114-Status: GOOD ( 13.99 ) 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 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);