Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp473484pxj; Fri, 11 Jun 2021 04:00:52 -0700 (PDT) X-Google-Smtp-Source: ABdhPJymC0xKSU3ggy4H/mTbqdnUUXDqK+pirlI9KC91zNQH4xv9VnHWsK/Gza7xcvl9IFNjPGu8 X-Received: by 2002:a05:6402:11c8:: with SMTP id j8mr3107682edw.200.1623409252083; Fri, 11 Jun 2021 04:00:52 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1623409252; cv=none; d=google.com; s=arc-20160816; b=eZTIy21vBzZlC1NKuby8HEt6S5wAtDv6i4ICzPyaagWb5QKwUX2GLzBgSDdIg48iTF JYFHsX/yZ6Ru6d3zWlutEdt4LrfL2m9PkEGNAOO4mqqLK8dnguXbou9re8xHQKjMGQp4 FeRwQrXO+jkLWTpI4hRTUDu8izAnfY9wQlfUY/zOmhZhLg2VsasXSb+aRH2BRlxnNGVG WeRogE79WxdA2DAvPGJ8jsRKqLjCROEF5UR1vBqXCQIvBpo1BQNzY0F8r58G+qlT8E2Q UOZ6BiN134MgUu+QgqO/Hi1eQuVG67fywFqRIEYVnQ5Pf101jzH6C/hHUWd34DhJRlSB wKxA== 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=sBBrNcRcoCL/xpRYwaZsWGPqaxLMrd3sDw+dNrb6tlk=; b=AL5QdHd7492c9QP0iISN4vljhzGZ7fWXwVZPHFgBWKdAPxDdKbIu/0nSV/aRuImIa6 pR54d5pJNgsDGbx6GoMRYPeu0Nu1NDh+fIsQSNGXaVcihf5TUiLwq1tH3L97x7rRJdNH vpkhViIwxzr7urdb2NPz/b1xxRFyEqdIgj/YDFLcg3XuV14rSYrEcdon9IzmyYVmx06i LUPkMta13jMtBt2wOqYuipqbpghZsZx1RWqTfiisg4WLbSStrGXLy1HJIGbITPCt/6AT 5/4mYgji3uBqDzH4YVpu+46Wayq0w9rQU7fziISyDY5ZyTEnI9xvEb6fICjpOwWcNHeU Y7Zw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=dgrwi5Dx; 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 bx25si3604316ejc.431.2021.06.11.04.00.29; Fri, 11 Jun 2021 04:00:52 -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=dgrwi5Dx; 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 S231890AbhFKK6j (ORCPT + 99 others); Fri, 11 Jun 2021 06:58:39 -0400 Received: from mail-ej1-f47.google.com ([209.85.218.47]:40702 "EHLO mail-ej1-f47.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231488AbhFKK5t (ORCPT ); Fri, 11 Jun 2021 06:57:49 -0400 Received: by mail-ej1-f47.google.com with SMTP id my49so3911851ejc.7; Fri, 11 Jun 2021 03:55:51 -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=sBBrNcRcoCL/xpRYwaZsWGPqaxLMrd3sDw+dNrb6tlk=; b=dgrwi5Dx58AvRvZeExRcy9xcRGEWSPLe91ZFgy8Z0EeKbwAC1Mfw+qL8ZluZ/OTWmu pbb2fRoi+24LTDG78J9RBaLBxmaCC+8ypVbamgosl3IEbe8nCtceRr1PtktUmfemKbqR cxeUH237Uz0k40YMd5Fj9MmvDC1EzHO5CmRQWM0pHuc/FmfNKauN1Ae4u035zoqaNQYI 7BV3/tTHY/O2HJfvYzncg9nSyIqn8n5u9t+8JvfQhFCpa7wpLUTDHhgBNBt4h2ZuYZHm 9WfOn3Ap1lfq4BcijRrlc9G7itI43eiADL/alHMaJZb2pGCQZQqBoggjpAkjTkfIRklQ VviA== 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=sBBrNcRcoCL/xpRYwaZsWGPqaxLMrd3sDw+dNrb6tlk=; b=QeznC6JGYWJ/yUQqHqyoSYKNy90bGl+vyCibZY3391V/66KF/LxgYvBJd4l/EJ1tVg mJVxSWJ62okcJq0Ia2Dhmt1GEOeZ1Ib9nN9NSMsMPDfPkD5zT1urBgt1KRbAEvUu+BGV 3/QyjiX0sX+LzEYkStl4/T3CLfYEmyB6zApzuFpuhcCcMBpjJGtjHcr/PpbkN32qo6zI k0ZdrRdgTY3STKd/dC6y+31/afG15cZpNLWucpT5Lj6pJgD+KurNHoOjq07Liq4Z7ioR Dm3vPdcIs6Ibo0B8pao8Vt0W8WwLnHRkA7sF7zE/32MT2QoYjbYvxQOAqBkqYiqS16fF iTfw== X-Gm-Message-State: AOAM532t+gUHR079i7sBaNrjltXHayDCq1wHpFp5ZZNs2CsqOXHtXYrI 6T7fYuI7v57tL/gv+PHT0wQ= X-Received: by 2002:a17:906:a458:: with SMTP id cb24mr3110665ejb.482.1623408890803; Fri, 11 Jun 2021 03:54:50 -0700 (PDT) Received: from yoga-910.localhost ([188.26.52.84]) by smtp.gmail.com with ESMTPSA id r19sm2492051eds.75.2021.06.11.03.54.47 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 11 Jun 2021 03:54:50 -0700 (PDT) From: Ioana Ciornei To: davem@davemloft.net, kuba@kernel.org, hkallweit1@gmail.com, netdev@vger.kernel.org, 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@oss.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, Laurentiu Tudor , Len Brown , "Rafael J . Wysocki" , Ioana Ciornei Subject: [PATCH net-next v9 04/15] of: mdio: Refactor of_phy_find_device() Date: Fri, 11 Jun 2021 13:53:50 +0300 Message-Id: <20210611105401.270673-5-ciorneiioana@gmail.com> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210611105401.270673-1-ciorneiioana@gmail.com> References: <20210611105401.270673-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 Acked-by: Grant Likely --- Changes in v9: None 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