From patchwork Tue Apr 15 12:58:00 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Russell King (Oracle)" X-Patchwork-Id: 14052234 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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id DD2D5C369AB for ; Tue, 15 Apr 2025 13:11:49 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:Date:Message-Id:Content-Type :Content-Transfer-Encoding:MIME-Version:Subject:Cc:To:From:References: In-Reply-To:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=NEfpJshR6Sfriowq4GQ0FM8g/G2gger1/qz9A6JvWeQ=; b=FMUOlnB5rC31VrKQYbOrwyH/Lg vjWw2tjg3xnR7hHFmjisYYe06vWhgzj7za/91/wBBPZFhJ9a6I/ycQS94thsQxXvy4FBwsr0psmcF paJPlLtu3+NItd2J/QO0bL2ad19b5equGAJ2OZHU8VzOcbscKzjZeXNCloOzX3cbx3+5NtfhRii9X qcs4vfZz0gzowDzlqlXeUXWSlp3WykanqZm9+uY5yzhvmwckkTPi95WXtNvu3VWegbBmopQsApupY A/Z+ZA+/LewmnkO64AOw5R/4FnUBOBBSZX1hBl4ybpRAHgsm9YnrUuazIHrwsbxfCDG9/SaFM22H+ kC1xqeMw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98.2 #2 (Red Hat Linux)) id 1u4g4h-00000005rjx-3vbp; Tue, 15 Apr 2025 13:11:39 +0000 Received: from pandora.armlinux.org.uk ([2001:4d48:ad52:32c8:5054:ff:fe00:142]) by bombadil.infradead.org with esmtps (Exim 4.98.2 #2 (Red Hat Linux)) id 1u4fsC-00000005q15-1S8f for linux-arm-kernel@lists.infradead.org; Tue, 15 Apr 2025 12:58:45 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=armlinux.org.uk; s=pandora-2019; h=Date:Sender:Message-Id:Content-Type: Content-Transfer-Encoding:MIME-Version:Subject:Cc:To:From:References: In-Reply-To:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help: List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=NEfpJshR6Sfriowq4GQ0FM8g/G2gger1/qz9A6JvWeQ=; b=vMSvp3kfcZkZz1BBI1ZLsx2tfT 7koMQYU6EWjS/2Dmh8m1EgqGu64fQqFBJcNy/6JZGVAjtx7Io4xHV51WYbtrj6JbnBYDHRzH8n7Vh F6jouX8VpsmmvUQiRJjwraVipM6+fkU1/UpmS6mLxee9XvGmPWcm2+47B7lpsPoYDQynkf0E81g3K 0HDbnLm1Q4Hf4LnLygsQrUDRWGFIkqKsu9dL2yGacKvx9yI+jZbzGTGUksdnahEXkairEk3FGHtKc k4awzckzgPy2T75Y/B5YcGxhTHnRUEBEaCftXaarDf16IYw0uzfuSyqTQrb2Ef3qyQ7ySRJbFOIh8 au1KZ/SQ==; Received: from e0022681537dd.dyn.armlinux.org.uk ([fd8f:7570:feb6:1:222:68ff:fe15:37dd]:52848 helo=rmk-PC.armlinux.org.uk) by pandora.armlinux.org.uk with esmtpsa (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1u4fs5-0008Bw-1i; Tue, 15 Apr 2025 13:58:37 +0100 Received: from rmk by rmk-PC.armlinux.org.uk with local (Exim 4.94.2) (envelope-from ) id 1u4frU-000nMf-6o; Tue, 15 Apr 2025 13:58:00 +0100 In-Reply-To: References: From: "Russell King (Oracle)" To: Andrew Lunn , Heiner Kallweit Cc: Alexandre Torgue , Andrew Lunn , Chen-Yu Tsai , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Jernej Skrabec , linux-arm-kernel@lists.infradead.org, linux-stm32@st-md-mailman.stormreply.com, linux-sunxi@lists.linux.dev, Maxime Coquelin , netdev@vger.kernel.org, Paolo Abeni , Samuel Holland Subject: [PATCH net-next 1/3] net: stmmac: sunxi: convert to set_clk_tx_rate() MIME-Version: 1.0 Content-Disposition: inline Message-Id: Date: Tue, 15 Apr 2025 13:58:00 +0100 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20250415_055844_399585_CF814190 X-CRM114-Status: GOOD ( 14.12 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Convert sunxi to use the set_clk_tx_rate() callback rather than the fix_mac_speed() callback. Signed-off-by: Russell King (Oracle) --- .../net/ethernet/stmicro/stmmac/dwmac-sunxi.c | 42 +++++++++---------- 1 file changed, 21 insertions(+), 21 deletions(-) diff --git a/drivers/net/ethernet/stmicro/stmmac/dwmac-sunxi.c b/drivers/net/ethernet/stmicro/stmmac/dwmac-sunxi.c index 9f098ff0ff05..a245c223a18f 100644 --- a/drivers/net/ethernet/stmicro/stmmac/dwmac-sunxi.c +++ b/drivers/net/ethernet/stmicro/stmmac/dwmac-sunxi.c @@ -72,28 +72,28 @@ static void sun7i_gmac_exit(struct platform_device *pdev, void *priv) regulator_disable(gmac->regulator); } -static void sun7i_fix_speed(void *priv, int speed, unsigned int mode) +static int sun7i_set_clk_tx_rate(void *bsp_priv, struct clk *clk_tx_i, + phy_interface_t interface, int speed) { - struct sunxi_priv_data *gmac = priv; - - /* only GMII mode requires us to reconfigure the clock lines */ - if (gmac->interface != PHY_INTERFACE_MODE_GMII) - return; - - if (gmac->clk_enabled) { - clk_disable(gmac->tx_clk); - gmac->clk_enabled = 0; - } - clk_unprepare(gmac->tx_clk); - - if (speed == 1000) { - clk_set_rate(gmac->tx_clk, SUN7I_GMAC_GMII_RGMII_RATE); - clk_prepare_enable(gmac->tx_clk); - gmac->clk_enabled = 1; - } else { - clk_set_rate(gmac->tx_clk, SUN7I_GMAC_MII_RATE); - clk_prepare(gmac->tx_clk); + struct sunxi_priv_data *gmac = bsp_priv; + + if (interface == PHY_INTERFACE_MODE_GMII) { + if (gmac->clk_enabled) { + clk_disable(gmac->tx_clk); + gmac->clk_enabled = 0; + } + clk_unprepare(gmac->tx_clk); + + if (speed == 1000) { + clk_set_rate(gmac->tx_clk, SUN7I_GMAC_GMII_RGMII_RATE); + clk_prepare_enable(gmac->tx_clk); + gmac->clk_enabled = 1; + } else { + clk_set_rate(gmac->tx_clk, SUN7I_GMAC_MII_RATE); + clk_prepare(gmac->tx_clk); + } } + return 0; } static int sun7i_gmac_probe(struct platform_device *pdev) @@ -140,7 +140,7 @@ static int sun7i_gmac_probe(struct platform_device *pdev) plat_dat->bsp_priv = gmac; plat_dat->init = sun7i_gmac_init; plat_dat->exit = sun7i_gmac_exit; - plat_dat->fix_mac_speed = sun7i_fix_speed; + plat_dat->set_clk_tx_rate = sun7i_set_clk_tx_rate; plat_dat->tx_fifo_size = 4096; plat_dat->rx_fifo_size = 16384; From patchwork Tue Apr 15 12:58:05 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Russell King (Oracle)" X-Patchwork-Id: 14052235 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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id EA04CC369AB for ; Tue, 15 Apr 2025 13:13:42 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:Date:Message-Id:Content-Type :Content-Transfer-Encoding:MIME-Version:Subject:Cc:To:From:References: In-Reply-To:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=nU1RZQP3gz6BlF36zUXcqwdullSwX6wrYvV0mrqTuc0=; b=TXxFXRPUMz2EyK/kO9bpSGOK6o RNf0BoA0UnUdWlT1Rrl5lY2b2UXrOqpulGrDtaYs6yApC6SD4AyG8sUr273qg4gmX9bX5JaxgcT0H Kqi7DAWKICplOlX6JJLoIGD8F7U2VFBg1dIpflu95rd+IYDn+hyEU7FVsJ2aIJHBlHeqLVn8fdg2H sSJDSlZFIc3gwfYmmHqstkithnZnGHr5YcU02EFW9qLLCczTIY02zxI5ih+UWVdVeFSmW0S+vjT5c +QvdA1Z7zlXwLdhLdE87d/TST0oJWWA5X/XoBA2oznKNGXv/J4JBj3CahiqNHcvwHJdyH6fUacld0 bBtZzHbQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98.2 #2 (Red Hat Linux)) id 1u4g6V-00000005s75-2XQY; Tue, 15 Apr 2025 13:13:31 +0000 Received: from pandora.armlinux.org.uk ([2001:4d48:ad52:32c8:5054:ff:fe00:142]) by bombadil.infradead.org with esmtps (Exim 4.98.2 #2 (Red Hat Linux)) id 1u4fsG-00000005q3a-0JZ4 for linux-arm-kernel@lists.infradead.org; Tue, 15 Apr 2025 12:58:49 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=armlinux.org.uk; s=pandora-2019; h=Date:Sender:Message-Id:Content-Type: Content-Transfer-Encoding:MIME-Version:Subject:Cc:To:From:References: In-Reply-To:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help: List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=nU1RZQP3gz6BlF36zUXcqwdullSwX6wrYvV0mrqTuc0=; b=fKQ78xpxpsbtfLUAyH0907v9/W SjC6gfxtB7ABm1y8VhvvfOKLHzDG0adiq4IiUXgFQVf6xiGAi7bxEOi/jQmakocEL6Kfex0myvUeG IbbmuuashVUfdjwRu2Y1hpwifWt+eHTf6XWJnDviVSrUVxsLvqlioSArtpcK0kv9XEi28EvzIbcP6 6166vYLtwm3tb8AYH98sj4vlNS4d2c9bOeyB+szlt2uFKad2xMmdP6erGyqdOin3V6jTUeYQI0HCy R508EWlyF6IsxnRTvoeJCPArg9kTxpvDmYA3e7xqKpGXiUiQkTXyAG0EVslSPA7wlV0VolbdRLpph lAo3DzMw==; Received: from e0022681537dd.dyn.armlinux.org.uk ([fd8f:7570:feb6:1:222:68ff:fe15:37dd]:55886 helo=rmk-PC.armlinux.org.uk) by pandora.armlinux.org.uk with esmtpsa (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1u4fsA-0008C8-2P; Tue, 15 Apr 2025 13:58:42 +0100 Received: from rmk by rmk-PC.armlinux.org.uk with local (Exim 4.94.2) (envelope-from ) id 1u4frZ-000nMl-BB; Tue, 15 Apr 2025 13:58:05 +0100 In-Reply-To: References: From: "Russell King (Oracle)" To: Andrew Lunn , Heiner Kallweit Cc: Alexandre Torgue , Andrew Lunn , Chen-Yu Tsai , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Jernej Skrabec , linux-arm-kernel@lists.infradead.org, linux-stm32@st-md-mailman.stormreply.com, linux-sunxi@lists.linux.dev, Maxime Coquelin , netdev@vger.kernel.org, Paolo Abeni , Samuel Holland Subject: [PATCH net-next 2/3] net: stmmac: sunxi: use stmmac_pltfr_probe() MIME-Version: 1.0 Content-Disposition: inline Message-Id: Date: Tue, 15 Apr 2025 13:58:05 +0100 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20250415_055848_114543_89E4A756 X-CRM114-Status: GOOD ( 11.14 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Rather than open-coding the calls to sun7i_gmac_init() and sun7i_gmac_exit() in the probe function, use stmmac_pltfr_probe() which will automatically call the plat_dat->init() and plat_dat->exit() methods appropriately. This simplifies the code. Signed-off-by: Russell King (Oracle) --- drivers/net/ethernet/stmicro/stmmac/dwmac-sunxi.c | 15 +-------------- 1 file changed, 1 insertion(+), 14 deletions(-) diff --git a/drivers/net/ethernet/stmicro/stmmac/dwmac-sunxi.c b/drivers/net/ethernet/stmicro/stmmac/dwmac-sunxi.c index a245c223a18f..665eab1d3409 100644 --- a/drivers/net/ethernet/stmicro/stmmac/dwmac-sunxi.c +++ b/drivers/net/ethernet/stmicro/stmmac/dwmac-sunxi.c @@ -144,20 +144,7 @@ static int sun7i_gmac_probe(struct platform_device *pdev) plat_dat->tx_fifo_size = 4096; plat_dat->rx_fifo_size = 16384; - ret = sun7i_gmac_init(pdev, plat_dat->bsp_priv); - if (ret) - return ret; - - ret = stmmac_dvr_probe(&pdev->dev, plat_dat, &stmmac_res); - if (ret) - goto err_gmac_exit; - - return 0; - -err_gmac_exit: - sun7i_gmac_exit(pdev, plat_dat->bsp_priv); - - return ret; + return stmmac_pltfr_probe(pdev, plat_dat, &stmmac_res); } static const struct of_device_id sun7i_dwmac_match[] = { From patchwork Tue Apr 15 12:58:10 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Russell King (Oracle)" X-Patchwork-Id: 14052236 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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id C558DC369B5 for ; Tue, 15 Apr 2025 13:15:33 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:Date:Message-Id:Content-Type :Content-Transfer-Encoding:MIME-Version:Subject:Cc:To:From:References: In-Reply-To:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=OqLXDGv3Fls4ysUHHIvC7QJrCvpDtEPwNQhSDZ3sDJ4=; b=GQfY7VAdkNV8OAncxraL1ijXAL UmXnzoO3m4pMsEea5b1gnkpi7HZd9kt/Fgkf5iuBAvwQqTyExoBeIVLkkls+l5VHEC1ztFU8lrbIL uuuJC3J/L8+Rk9kmHfpXx6J0ZNKdAUWwkqLKHk1PNbZjgYow4Ok7oJrNk4XeiGVvHV0EXrOrCD8nl gksuPnvU+3nFZSlElUmZTh8fpbfcTQRFzzSC8qtEPZ3oXMHigGN0sC2PQATFB+mcIjtRvzinSq6tB wIQpGEYGaPghiHEvcKhfO0pMK+qUrw5eXEsRudxT5BGO/lX5vgXYS9KGEsWSFcDc+zU8Rr8Bv9M2z Cbz2v/cw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98.2 #2 (Red Hat Linux)) id 1u4g8I-00000005sNz-1GRF; Tue, 15 Apr 2025 13:15:22 +0000 Received: from pandora.armlinux.org.uk ([2001:4d48:ad52:32c8:5054:ff:fe00:142]) by bombadil.infradead.org with esmtps (Exim 4.98.2 #2 (Red Hat Linux)) id 1u4fsL-00000005q5q-1ed6 for linux-arm-kernel@lists.infradead.org; Tue, 15 Apr 2025 12:58:54 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=armlinux.org.uk; s=pandora-2019; h=Date:Sender:Message-Id:Content-Type: Content-Transfer-Encoding:MIME-Version:Subject:Cc:To:From:References: In-Reply-To:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help: List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=OqLXDGv3Fls4ysUHHIvC7QJrCvpDtEPwNQhSDZ3sDJ4=; b=ViuqtjcQbaHZXdfHO3285BRbUz AbwRA36/hCCqufNfw6WB3lJKwWDm2445K9WaduGMmu0GVCiB8Z0PtmgVY0l4iXUYsfaEVvRu0dWK+ PWvKM/i6KX1WNJg0dhc+NhStQ1R0FNKb8Zkhx3m8o8R0rLwoSrDSOXvyrROnJSueQNDU6YYc5lNfI aUGnXjCjQQ33mYVtWF99qr7lgVQrIXssuLzBOlqgAMASApczkFyQGRJE560LoyCipkI6IgX8unPY1 t/L8hbaEMHMs9Fm9Zm3cuY4AvKjx7yHuPu2B/n66Hauj11C4ZPRmCtQ/N2l65UPqQ+CDFnagVfIDg L7SgmtpA==; Received: from e0022681537dd.dyn.armlinux.org.uk ([fd8f:7570:feb6:1:222:68ff:fe15:37dd]:55888 helo=rmk-PC.armlinux.org.uk) by pandora.armlinux.org.uk with esmtpsa (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1u4fsG-0008CS-0W; Tue, 15 Apr 2025 13:58:48 +0100 Received: from rmk by rmk-PC.armlinux.org.uk with local (Exim 4.94.2) (envelope-from ) id 1u4fre-000nMr-FT; Tue, 15 Apr 2025 13:58:10 +0100 In-Reply-To: References: From: "Russell King (Oracle)" To: Andrew Lunn , Heiner Kallweit Cc: Alexandre Torgue , Andrew Lunn , Chen-Yu Tsai , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Jernej Skrabec , linux-arm-kernel@lists.infradead.org, linux-stm32@st-md-mailman.stormreply.com, linux-sunxi@lists.linux.dev, Maxime Coquelin , netdev@vger.kernel.org, Paolo Abeni , Samuel Holland Subject: [PATCH net-next 3/3] net: stmmac: sunxi: use devm_stmmac_pltfr_probe() MIME-Version: 1.0 Content-Disposition: inline Message-Id: Date: Tue, 15 Apr 2025 13:58:10 +0100 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20250415_055853_442555_532A21FD X-CRM114-Status: GOOD ( 12.53 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Using devm_stmmac_pltfr_probe() simplifies the probe function. This will not only call plat_dat->init (sun7i_dwmac_init), but also plat_dat->exit (sun7i_dwmac_exit) appropriately if stmmac_dvr_probe() fails. This results in an overall simplification of the glue driver. Signed-off-by: Russell King (Oracle) --- drivers/net/ethernet/stmicro/stmmac/dwmac-sunxi.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/net/ethernet/stmicro/stmmac/dwmac-sunxi.c b/drivers/net/ethernet/stmicro/stmmac/dwmac-sunxi.c index 665eab1d3409..1eadcf5d1ad6 100644 --- a/drivers/net/ethernet/stmicro/stmmac/dwmac-sunxi.c +++ b/drivers/net/ethernet/stmicro/stmmac/dwmac-sunxi.c @@ -144,7 +144,7 @@ static int sun7i_gmac_probe(struct platform_device *pdev) plat_dat->tx_fifo_size = 4096; plat_dat->rx_fifo_size = 16384; - return stmmac_pltfr_probe(pdev, plat_dat, &stmmac_res); + return devm_stmmac_pltfr_probe(pdev, plat_dat, &stmmac_res); } static const struct of_device_id sun7i_dwmac_match[] = { @@ -155,7 +155,6 @@ MODULE_DEVICE_TABLE(of, sun7i_dwmac_match); static struct platform_driver sun7i_dwmac_driver = { .probe = sun7i_gmac_probe, - .remove = stmmac_pltfr_remove, .driver = { .name = "sun7i-dwmac", .pm = &stmmac_pltfr_pm_ops,