From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 8D873C433F5 for ; Thu, 17 Mar 2022 12:52:27 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 7521A83F43; Thu, 17 Mar 2022 13:52:07 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=kernel.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (2048-bit key; unprotected) header.d=kernel.org header.i=@kernel.org header.b="C0bVVeve"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 4925983ADC; Thu, 17 Mar 2022 13:51:09 +0100 (CET) Received: from sin.source.kernel.org (sin.source.kernel.org [IPv6:2604:1380:40e1:4800::1]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 4949D83D16 for ; Thu, 17 Mar 2022 13:50:42 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=kernel.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=kabel@kernel.org Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sin.source.kernel.org (Postfix) with ESMTPS id 18D0CCE2341; Thu, 17 Mar 2022 12:50:40 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id F18DFC36AEA; Thu, 17 Mar 2022 12:50:37 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1647521439; bh=K8lAjQonxu0jzgArFD3kNJ7FTU1SjbIsszx7C3YBqIo=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=C0bVVeveysFCAeDW5RWKJhyjQOF/fINnczdjCNjzkit4e6uEEQDgR+DW8osOeuera TxVM3KgWISowz5ca6rbZZ5LYg2QQielPvmY4gGZGoNOHPVjTmmZ71W2prJmJAmrUqC e+I8WfQ3Yl7M6up4oH83+EeZLGrHp4kbuU8noxwbFw4768iQ5nYjHURgzYja1SiUNu xEmAVcK6DHrkyVFVGGsAqqiMlTqrWCyIy6t28vchg7/mAi3paAg20Fn+GoAWZyK1eq dts95CqiDXoj2cex21KL/yGnGeEjm+AsYcMekw8fmIcko/qUjV8wfvskf9J5Ujjrp2 4JFoVEPa5pRMA== From: =?UTF-8?q?Marek=20Beh=C3=BAn?= To: Joe Hershberger , Ramon Fried Cc: u-boot@lists.denx.de, =?UTF-8?q?Marek=20Beh=C3=BAn?= , Andre Przywara , Heinrich Schuchardt , Samuel Holland , Wolfgang Denk Subject: [PATCH u-boot-net 13/14] bcmgenet, sun8i_emac: Don't connect PHY two times Date: Thu, 17 Mar 2022 13:49:57 +0100 Message-Id: <20220317124958.27921-14-kabel@kernel.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20220317124958.27921-1-kabel@kernel.org> References: <20220317124958.27921-1-kabel@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.39 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.103.5 at phobos.denx.de X-Virus-Status: Clean From: Marek BehĂșn The bcmgenet and sun8i_emac drivers call phy_connect(), which finds / creates the PHY and also connects it to the eth device via phy_connect_dev(), then set some phydev members (bcmgenet only), and then call phy_connect_dev() explicitly again. Drop the second phy_connect_dev(), since it is unnecesary. Signed-off-by: Marek BehĂșn --- drivers/net/bcmgenet.c | 2 -- drivers/net/sun8i_emac.c | 2 -- 2 files changed, 4 deletions(-) diff --git a/drivers/net/bcmgenet.c b/drivers/net/bcmgenet.c index ef321f2839..4e1f8ed7a4 100644 --- a/drivers/net/bcmgenet.c +++ b/drivers/net/bcmgenet.c @@ -526,8 +526,6 @@ static int bcmgenet_phy_init(struct bcmgenet_eth_priv *priv, void *dev) } phydev->advertising = phydev->supported; - phy_connect_dev(phydev, dev); - priv->phydev = phydev; phy_config(priv->phydev); diff --git a/drivers/net/sun8i_emac.c b/drivers/net/sun8i_emac.c index 5943a5e3f0..906a8ec5d0 100644 --- a/drivers/net/sun8i_emac.c +++ b/drivers/net/sun8i_emac.c @@ -391,8 +391,6 @@ static int sun8i_phy_init(struct emac_eth_dev *priv, void *dev) if (!phydev) return -ENODEV; - phy_connect_dev(phydev, dev); - priv->phydev = phydev; phy_config(priv->phydev); -- 2.34.1