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 5430DC433F5 for ; Fri, 18 Mar 2022 14:53:10 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 6285683F6C; Fri, 18 Mar 2022 15:51:31 +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="vB1VWYap"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 00BF983D06; Fri, 18 Mar 2022 15:51:05 +0100 (CET) Received: from ams.source.kernel.org (ams.source.kernel.org [IPv6:2604:1380:4601:e00::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 36FFB83025 for ; Fri, 18 Mar 2022 15:50:59 +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 ams.source.kernel.org (Postfix) with ESMTPS id E105AB821A5; Fri, 18 Mar 2022 14:50:58 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id AC170C340EC; Fri, 18 Mar 2022 14:50:56 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1647615057; bh=VeWRidR0McK/7xywFEnT8CD+IF3Jba/hlJgFRMRi704=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=vB1VWYapfJ1hLjz8VPf/bMGpnAv7kOUA/cFn8V860i1CqsoSYpyYlgwlRKZPeo0DW e4H42IygmulA3EFcdkjJUNHeomUTss5O30H3O82cxeZGDZCQn1eocccynDft3Oa4TR szZM5YkxrAVZA0DkUmiKMJb6jRqgvQGlqrTclgAYxdYA5AX+i8L80/WIgP7m6TJW99 +dl67Sy877skyz/nQC5QBWmHyM6sDjGC0x1ALv2p+TsKuZ1TeVGNxulB3h43r9FTYR OkANuVHlL9m+vpsMFnrxs3nkfCiJytt42LVPQ/93wDR5me+DYT4XXVFaV2/XSvS+MJ pTk/Drl0P7/DQ== 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?= Subject: [PATCH u-boot-net v2 13/14] bcmgenet, sun8i_emac: Don't connect PHY two times Date: Fri, 18 Mar 2022 15:50:34 +0100 Message-Id: <20220318145035.10148-14-kabel@kernel.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20220318145035.10148-1-kabel@kernel.org> References: <20220318145035.10148-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 Reviewed-by: Ramon Fried --- 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