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 30D41C433F5 for ; Wed, 6 Apr 2022 22:35:47 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 09E1183E8A; Thu, 7 Apr 2022 00:34:23 +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="CoyaNtwT"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 905C483E53; Thu, 7 Apr 2022 00:33:53 +0200 (CEST) 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 6A2BB83E68 for ; Thu, 7 Apr 2022 00:33:34 +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 ams.source.kernel.org (Postfix) with ESMTPS id 1C684B8259A; Wed, 6 Apr 2022 22:33:34 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id C19C4C385A5; Wed, 6 Apr 2022 22:33:32 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1649284413; bh=10ujQjFoZGb+GR0MPmp7K/3E+XSnJiKxrcWBM9YArJo=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=CoyaNtwTxbamjPuQB434CaZK4lUlbdBt+9YDMa9/tAmROgh7ptEBCpH/TVvVNQVJX Yf5oxiaQ12LUiwny7eDRpVuQhdv0BTe09gR49mLsAc8ZVEhL6j3opB49OwJZLWzR1S kX0jOYr0uUNBZHrVn/UgOMoJ2S9y77yk8bcZgocfDGY+TnPlbPX0ItZ55lSpkCKAQ+ HkH9EA8zDGgWd4/TIYHA9kecIvL2KwI3cpBpOgjeQMgaAyRWGHFT39wslGtyDSFmI/ XWxzJ5nt6NWehkYtWotwzqSWxCS/ZfpoTTJfl/bEblXzQdnqKRCRmKdCXmI8LZPhUA lmcNvOZbo72oA== 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 v4 13/14] bcmgenet, sun8i_emac: Don't connect PHY two times Date: Thu, 7 Apr 2022 00:33:07 +0200 Message-Id: <20220406223308.9833-14-kabel@kernel.org> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220406223308.9833-1-kabel@kernel.org> References: <20220406223308.9833-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.35.1