From patchwork Tue Aug 29 10:40:15 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jisheng Zhang X-Patchwork-Id: 13368843 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 DA769C83F14 for ; Tue, 29 Aug 2023 10:53:27 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=Jhem6kZfH8EfuehRpPXqMEERkm0vI901+Ji34ARTfl4=; b=K3h5JUBQnXob/1 TgfoSkobKnwNA3vOIZG7RCpH5kA4NAi+5/U9e8bQO+2UyZsLl2TgI8rR8fK+2cBAYjFWFdBySIcdu 8lESREWhGjnB0smAipmq+u+WDu9RuunH6RDtF/tLTjTgOh1J6/4yMWmtNpIQ5E3+ut3R/b1keoTti Q7soZYNvQcphGmbrBr2eSvz5XtUV9/NuG0G43Jsr0K7e3A1mCnh9/RIpM/otDScP700O7ZzzEeac5 wE3P+NytFGjeOUE9ajgBDZqHfvvLgVU2vacNbgWIADZCrGiyIwMt7bWcR9lcHemqV3fFSfyou9ZUr LIPg+PB3hpyKXGOCg8tQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1qawLF-00BKnc-0p; Tue, 29 Aug 2023 10:53:01 +0000 Received: from dfw.source.kernel.org ([2604:1380:4641:c500::1]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1qawLA-00BKle-1n for linux-arm-kernel@lists.infradead.org; Tue, 29 Aug 2023 10:52:57 +0000 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 109A865450; Tue, 29 Aug 2023 10:52:56 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 7F705C433CB; Tue, 29 Aug 2023 10:52:49 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1693306375; bh=QBvxkEj1DY0GKW8rngBNgzoMssSjhwO/YTw1SWluFmg=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=OYEeptArhVvkKvQD8GAnQQ7kKRo185LJvLlUxpD3JqffnV1vPta0QHepeL+Lm7Jy1 DHGfY2ZST9yW0xzmVbAlR2TRnDitkW94hHS2MeeY8i7E1QTYhTjCGl7E/u7BMlk+wO +PD/RKlgtKR+reTolmIj93qT8Be2pBpty0gMffEW3aetpwudUtJyKy1SRZfGirpkMl eCJm+zbBl8shmnRxgSoK3PEfis40j/3iu/qsI0zwGW7N2T9qUVPMv36qqSRUE0Wdts FBL8/1LdSBNw7q4Hy0sjfLe9B68r+zxXe4QALFXBMJZxRJKgPCzTV6RRGPg/xc4xjE 2gJq4lfwWqzNQ== From: Jisheng Zhang To: Giuseppe Cavallaro , Alexandre Torgue , Jose Abreu , "David S . Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Maxime Coquelin , Shawn Guo , Sascha Hauer , Pengutronix Kernel Team , Fabio Estevam , NXP Linux Team , Vladimir Zapolskiy , Neil Armstrong , Kevin Hilman , Jerome Brunet , Martin Blumenstingl , Emil Renner Berthing , Samin Guo , Chen-Yu Tsai , Jernej Skrabec , Samuel Holland , Thierry Reding , Jonathan Hunter , Nobuhiro Iwamatsu , Russell King , Matthias Brugger , AngeloGioacchino Del Regno , Bartosz Golaszewski Cc: netdev@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH net-next 04/22] net: stmmac: dwmac-generic: use devm_stmmac_pltfr_probe() Date: Tue, 29 Aug 2023 18:40:15 +0800 Message-Id: <20230829104033.955-5-jszhang@kernel.org> X-Mailer: git-send-email 2.40.0 In-Reply-To: <20230829104033.955-1-jszhang@kernel.org> References: <20230829104033.955-1-jszhang@kernel.org> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230829_035256_633206_CFD1CB49 X-CRM114-Status: GOOD ( 14.85 ) 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 Use the devres variant of stmmac_pltfr_probe() and finally drop the remove() hook. Signed-off-by: Jisheng Zhang --- drivers/net/ethernet/stmicro/stmmac/dwmac-generic.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/net/ethernet/stmicro/stmmac/dwmac-generic.c b/drivers/net/ethernet/stmicro/stmmac/dwmac-generic.c index 84582fc04d2e..598eff926815 100644 --- a/drivers/net/ethernet/stmicro/stmmac/dwmac-generic.c +++ b/drivers/net/ethernet/stmicro/stmmac/dwmac-generic.c @@ -46,7 +46,7 @@ static int dwmac_generic_probe(struct platform_device *pdev) plat_dat->unicast_filter_entries = 1; } - 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 dwmac_generic_match[] = { @@ -67,7 +67,6 @@ MODULE_DEVICE_TABLE(of, dwmac_generic_match); static struct platform_driver dwmac_generic_driver = { .probe = dwmac_generic_probe, - .remove_new = stmmac_pltfr_remove_no_dt, .driver = { .name = STMMAC_RESOURCE_NAME, .pm = &stmmac_pltfr_pm_ops,