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 2AFF8C433EF for ; Tue, 29 Mar 2022 20:11:41 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 3EB04840A4; Tue, 29 Mar 2022 22:11:09 +0200 (CEST) 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="Ip9uX2vp"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 75D628409C; Tue, 29 Mar 2022 22:09:30 +0200 (CEST) Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) (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 B170F8408A for ; Tue, 29 Mar 2022 22:09:10 +0200 (CEST) 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 dfw.source.kernel.org (Postfix) with ESMTPS id 2DACE616C9; Tue, 29 Mar 2022 20:09:09 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id D5E5AC34100; Tue, 29 Mar 2022 20:09:07 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1648584548; bh=VeWRidR0McK/7xywFEnT8CD+IF3Jba/hlJgFRMRi704=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Ip9uX2vp93zAUF4+9LlBosgk3FjF4bR32RqNjlUq4QayKBH/h3fqIyETdUTiJtLXd YY5NLyEbFOFHBa67c8vVRj9av+pjpJTSPPrTkU2vldEf+KnJ2mTiiVY16OrcMXMJ+0 uiGVJlXYOidvig/18odcYf8qjVnrk2IfCLkAh3JoxZ5azsOWi4JATHqAeL51yVrRlF zP93Cqh2cjlylTCOB/ZDmFL+09K500oL+07nJddqbLl27CutcCZKw1RGjIx73bo/Ai iT9MaV2tSZA4a+cI7QFWOebVtaHN9pAT/+jkJzNXFcEYX+0J1TRSGwriuprGTAa7ma 9S5udQUUWtWIg== 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 v3 13/14] bcmgenet, sun8i_emac: Don't connect PHY two times Date: Tue, 29 Mar 2022 22:08:44 +0200 Message-Id: <20220329200845.13435-14-kabel@kernel.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20220329200845.13435-1-kabel@kernel.org> References: <20220329200845.13435-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