Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp665022pxj; Thu, 10 Jun 2021 09:43:24 -0700 (PDT) X-Google-Smtp-Source: ABdhPJx/Cw6f80nfiglRe0tQ7iTpTQKjE4VoUEA4g3PqByjM70pHXX85grvjGdaoxSfCYAkeLB+G X-Received: by 2002:a17:907:2136:: with SMTP id qo22mr508059ejb.40.1623343404090; Thu, 10 Jun 2021 09:43:24 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1623343404; cv=none; d=google.com; s=arc-20160816; b=i8qCv74C8ZNTlYylsKJooYLBi7CStZkZa4ipxRrLZFlqXQUErfNiiLCQiEwPjv3waL gt5TalhuNZPBCHuJiz/pmxIxOMjb8Z7JUOH+WFeRhQfUvKdGTzuRZDL7OkxzsAiPeM+Q F4VDuvv29tfxyN+0V4Tx+16/KtUth9l1gmZn1R34ZPOSMW82cZ7xvtA9hj9kVrNakvGM WzynOat1fAeg43pJMWXOLGk+l3ycfa3tO0GEDRn2qLu3M5JwEQhTxGmAUL5OSgeN6P45 3vi4RU+s90iFVF/fHtOX0R+9fgIMrQVz5onzuVtCiVTDFr2yXQpajZ2q8xmIhakrIo42 p3Hg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=j9eHvw1lqfOl6qU0681eRcLN+MHCzmRQcN2E31ftIDo=; b=LtGGjyVCEwAFw4khM/+xiokrtZftiqzxwbBPfRUD+EwqzLoCk2pGK4Bzi6LELQao6B Z0Hk4cJ4S/m9unGGbt96DNTmFloyHNG8oI7c+A0yYQKzsuhle8IHpLDftedrSeogpQZb 5MhFvf9w9OIqZoUa2Ni+bsCoSao+IYk/0+0YpH9hl0SkwYSNbCWD+zYzMMPMd4FoKyvS yclm4l2Gjhg/fvKL1EEMfegDbRFiasbFttHnrmnmLgj0hXEzNv+r64Tybiqpi0qridKh V3RGGhshw19Hy9vjXX1m8mtDITQGDlmigrD04hBrwV0ewCH+X9Pzbfu3eEbE3OMEdCE2 5/0A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=sSybiEKH; 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=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id cb25si2616347ejb.709.2021.06.10.09.43.00; Thu, 10 Jun 2021 09:43:24 -0700 (PDT) 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=@gmail.com header.s=20161025 header.b=sSybiEKH; 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=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231510AbhFJQmv (ORCPT + 99 others); Thu, 10 Jun 2021 12:42:51 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46780 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231410AbhFJQmg (ORCPT ); Thu, 10 Jun 2021 12:42:36 -0400 Received: from mail-ed1-x52c.google.com (mail-ed1-x52c.google.com [IPv6:2a00:1450:4864:20::52c]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9C8F1C0617A6; Thu, 10 Jun 2021 09:40:25 -0700 (PDT) Received: by mail-ed1-x52c.google.com with SMTP id w21so33742690edv.3; Thu, 10 Jun 2021 09:40:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=j9eHvw1lqfOl6qU0681eRcLN+MHCzmRQcN2E31ftIDo=; b=sSybiEKHNkV6oB3gxfZkR+Jicue8rGl58fooPFQAaHFXby18vVnsP8GJ2AWv/WCtTo kFftFCtgK7+WmNowlV/xnJOgeAJ7p7zhj8K6EH0+V0DpIRkccTn3W/FRl99dHLYEJPYh pJjWOczWQt8gh+i4pQMQPquU2USV2kmM3ODeA5O2o7ryAyqZhGNTBHMsH+qRiPyjec82 wx1EhfDgHVYliAznWeBsNbh50gyYlxmw1Ox2hMZBcR1MDSByGS5ibrFOUj1xqjp/sGmM 0qOC6q6H0xZT7kEK5pqxbXDHt219rYrMf37mmBL5KpxkeROGG8gQJCyKqJEFdPYdtzzg GodQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=j9eHvw1lqfOl6qU0681eRcLN+MHCzmRQcN2E31ftIDo=; b=sU32CzUqUEIUY3gWf9haLNM17lyLuTxTwv4RSOjmzuRwZhPvqW/d6JJMYa88DWF+Tf d0BcaQ1tR3JhxxxBOT4S5LQRbuHhmyAYq9W7bqSCcisFhHt35AHeuR7qV2UTEQv5OZAF xVFSIhLcnLjbEGIOwbWFfyYKkqWMU9JrLE40sBruUfL6WKgor05N/dR9rP5THKq/dq72 bGQgQmmWdnWcqLE37eOjqYCjkxKgiHtse1EMjXbHot4MTeGsHKIlKsFhu+9c3TZ7viL4 HI3gLPnNWHlPrKYOhYNFoRBDhCySXjM9prTuViNcDadCbbKnBtdrvP+akl8XlV6SNHOt KCbQ== X-Gm-Message-State: AOAM5303JS15JT/dJSlH0KS6deb6V96oRaVE17cm50R1L/dc0JPScHlQ 47YfTA+5FN7zpXDGwGUJCJw= X-Received: by 2002:a05:6402:543:: with SMTP id i3mr342712edx.173.1623343224091; Thu, 10 Jun 2021 09:40:24 -0700 (PDT) Received: from yoga-910.localhost ([188.26.52.84]) by smtp.gmail.com with ESMTPSA id e22sm1657166edv.57.2021.06.10.09.40.22 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 10 Jun 2021 09:40:23 -0700 (PDT) From: Ioana Ciornei To: Grant Likely , "Rafael J . Wysocki" , Jeremy Linton , Andrew Lunn , Andy Shevchenko , Florian Fainelli , Russell King - ARM Linux admin , Heikki Krogerus , Marcin Wojtas , Pieter Jansen Van Vuuren , Jon , Saravana Kannan , Randy Dunlap , calvin.johnson@nxp.com Cc: Cristi Sovaiala , Florin Laurentiu Chiculita , Madalin Bucur , linux-arm-kernel@lists.infradead.org, Diana Madalina Craciun , linux-acpi@vger.kernel.org, linux-kernel@vger.kernel.org, linux.cj@gmail.com, netdev@vger.kernel.org, Laurentiu Tudor , Len Brown , "Rafael J . Wysocki" , Calvin Johnson , Ioana Ciornei Subject: [PATCH net-next v8 04/15] of: mdio: Refactor of_phy_find_device() Date: Thu, 10 Jun 2021 19:39:06 +0300 Message-Id: <20210610163917.4138412-5-ciorneiioana@gmail.com> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210610163917.4138412-1-ciorneiioana@gmail.com> References: <20210610163917.4138412-1-ciorneiioana@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Calvin Johnson Refactor of_phy_find_device() to use fwnode_phy_find_device(). Signed-off-by: Calvin Johnson Signed-off-by: Ioana Ciornei --- Changes in v8: None Changes in v7: None 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 6ef8b6e40189..0ba1158796d9 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.31.1