Message ID | 20230623100417.93592-7-brgl@bgdev.pl |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:994d:0:b0:3d9:f83d:47d9 with SMTP id k13csp5658531vqr; Fri, 23 Jun 2023 03:08:03 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ4Ro5q844RSx5mdCNGBZF0ZyqQzBcfKe2Rxrf49MqpTq2gNfBxg4bIGVGf8TXpodViEJZ8c X-Received: by 2002:a17:90a:6d04:b0:259:3e2a:b6d8 with SMTP id z4-20020a17090a6d0400b002593e2ab6d8mr16365875pjj.17.1687514882681; Fri, 23 Jun 2023 03:08:02 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1687514882; cv=none; d=google.com; s=arc-20160816; b=j0K4huffifVS9ETFysoNXahieRZnchbzXFez5llPa33n2HvlfDs2iNIZTVYh6x+xR+ sSaF231kd4dLpx7YKb4rDzX6mLd4xtNRv93RWRkPP0OT5GU4Pypq8t2A2s/nx8nyOwOa WfVxN8H2BYFw2AISnFW2orVdBYzoWuytGM6ch552jgFvOLUGZm6hl4NEkOS9JMw+2z/N ONA9thTW5E+k0Z77BTkNaj4dVHP5aHALkPifvESFns5MaM28ZqVB/lelKo+eEmzx0Xo8 Y/A0LW/5Rti6eIUWXS/YaOW2qJZU0KwT6TQCF1OYdO6s8UbbU7OsJBZOSCHHYHrOOG9s aobw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=yItovFwloe3duebYnq7A6B4V/jKgQ44zzRGa/G+pPW8=; b=nTlGDt5Xn67/6XmViuyKvXZsQXOdlvL2LxjdXH3IXQf7aSC8l9FQMTlGB4aK1Tzwfp EO8LYrhxjbuxcyJC4V6tbbhFYIdUIjJ8J+wDNgW1Iov7W3ca2SryxPzeyGS81GvPauPO DcZq1hHkTO2wFs5oIocXeyI7XGvDlz4LkVbQAweRuhUn9FiAOW+xqz87WkgaKsLbL4Gn i/udYCrJSPlWN9BN0TkbC8GD2Um1lr2RNUnzswCKJ9ohqMiTSHhePGaR5IfWOlDdbVaO +nAgb0ubXSyJQ3DqFku7f1gD0YgXl763l/nvZfh/2D4bPr/kkTsYbInYBWcxzeYFIxjS kz4A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@bgdev-pl.20221208.gappssmtp.com header.s=20221208 header.b=l0DUJdzl; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id p7-20020a17090a74c700b0025998ebdc4csi1558164pjl.60.2023.06.23.03.07.50; Fri, 23 Jun 2023 03:08:02 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@bgdev-pl.20221208.gappssmtp.com header.s=20221208 header.b=l0DUJdzl; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232099AbjFWKFe (ORCPT <rfc822;maxin.john@gmail.com> + 99 others); Fri, 23 Jun 2023 06:05:34 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43658 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231543AbjFWKEb (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Fri, 23 Jun 2023 06:04:31 -0400 Received: from mail-wr1-x42b.google.com (mail-wr1-x42b.google.com [IPv6:2a00:1450:4864:20::42b]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7C2CD2114 for <linux-kernel@vger.kernel.org>; Fri, 23 Jun 2023 03:04:29 -0700 (PDT) Received: by mail-wr1-x42b.google.com with SMTP id ffacd0b85a97d-30fcda210cfso467298f8f.3 for <linux-kernel@vger.kernel.org>; Fri, 23 Jun 2023 03:04:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bgdev-pl.20221208.gappssmtp.com; s=20221208; t=1687514668; x=1690106668; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=yItovFwloe3duebYnq7A6B4V/jKgQ44zzRGa/G+pPW8=; b=l0DUJdzlIHLN9/12vsEkAUNYNor4yQLqqSoGRxNk3EPmXOD2uFpAHbY4VklRmVQl3W +ENIrmsfRrIo4VfPjgmUQ/qlVWQ/ASV+aqcDfTJW9cv55BQDIxyjuiuCIZ4ey++WfOVZ e1P2A4jCjaM+XdtvCqaOpk3t2uaYGGziW1b1bYWPSrzQ7RFEhHoKViWdajx1ztsw+2oN bnk9AbhndEj+pJmoqRdzjQ34R9lSf+WGThG2I/dM3n8sMm339S386riM8UpqOyAs/hIl HePSRoIZgG9WM5dzaaaI+QNv3jNFWhnplP86qSx4p1RkU6q37ZAgOElyDOcrJT12BHma qu/g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1687514668; x=1690106668; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=yItovFwloe3duebYnq7A6B4V/jKgQ44zzRGa/G+pPW8=; b=hpYqktPigGhCXxImzA5oH9JWeH7i+Z3S+0LW5oHg/23OYPs2kiwne17PeizbUI6YiJ 4PvjTe20s3n1xx9cLqnsE8VKbAILPky2uylqQkt2XDUc4U+AgZjYS+ly1ssdDALwzrOt nm4qegiv0d4dgNtPLMyblWqOBmc8HpLQGZ9diiApXbVoqV6AP5tHKHDC2i0M4o/7wKw+ +wFYwmKg6n83YgPQGxZS5Y6NJ/PRQ/UK0zICFKP7w25YDEcntdhSZG2SAB1KkCcSE9AP HiPqlmydh9rTn4Q0FDDN9a13fo5uZtlTmQUqmanieZkQryfyJZtME0RtC2uww97z0TQI yGRA== X-Gm-Message-State: AC+VfDymDE5nHgj/ywt9/QBFb5cLVB/oDYcdEAcNwd+SDUy3OB5SHcgS 2X8CTyqY2Kdry92ItLEbRntdMA== X-Received: by 2002:a5d:5346:0:b0:30f:cb74:35f9 with SMTP id t6-20020a5d5346000000b0030fcb7435f9mr17053297wrv.66.1687514667863; Fri, 23 Jun 2023 03:04:27 -0700 (PDT) Received: from brgl-uxlite.home ([2a01:cb1d:334:ac00:ddc2:ce92:1ed6:27bd]) by smtp.gmail.com with ESMTPSA id x8-20020a5d54c8000000b0030fae360f14sm9079360wrv.68.2023.06.23.03.04.26 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 23 Jun 2023 03:04:27 -0700 (PDT) From: Bartosz Golaszewski <brgl@bgdev.pl> To: Giuseppe Cavallaro <peppe.cavallaro@st.com>, Alexandre Torgue <alexandre.torgue@foss.st.com>, Jose Abreu <joabreu@synopsys.com>, "David S . Miller" <davem@davemloft.net>, Eric Dumazet <edumazet@google.com>, Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>, Maxime Coquelin <mcoquelin.stm32@gmail.com>, Junxiao Chang <junxiao.chang@intel.com>, Vinod Koul <vkoul@kernel.org>, Bhupesh Sharma <bhupesh.sharma@linaro.org> Cc: netdev@vger.kernel.org, linux-stm32@st-md-mailman.stormreply.com, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, Bartosz Golaszewski <bartosz.golaszewski@linaro.org> Subject: [PATCH net-next v2 06/11] net: stmmac: dwmac-generic: use stmmac_pltfr_probe() Date: Fri, 23 Jun 2023 12:04:12 +0200 Message-Id: <20230623100417.93592-7-brgl@bgdev.pl> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230623100417.93592-1-brgl@bgdev.pl> References: <20230623100417.93592-1-brgl@bgdev.pl> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_NONE, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1769487605769167341?= X-GMAIL-MSGID: =?utf-8?q?1769487605769167341?= |
Series |
net: stmmac: introduce devres helpers for stmmac platform drivers
|
|
Commit Message
Bartosz Golaszewski
June 23, 2023, 10:04 a.m. UTC
From: Bartosz Golaszewski <bartosz.golaszewski@linaro.org> Shrink the code and remove labels by using the new stmmac_pltfr_probe() function. Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org> --- drivers/net/ethernet/stmicro/stmmac/dwmac-generic.c | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-)
diff --git a/drivers/net/ethernet/stmicro/stmmac/dwmac-generic.c b/drivers/net/ethernet/stmicro/stmmac/dwmac-generic.c index dabf05601221..20fc455b3337 100644 --- a/drivers/net/ethernet/stmicro/stmmac/dwmac-generic.c +++ b/drivers/net/ethernet/stmicro/stmmac/dwmac-generic.c @@ -46,19 +46,12 @@ static int dwmac_generic_probe(struct platform_device *pdev) plat_dat->unicast_filter_entries = 1; } - /* Custom initialisation (if needed) */ - ret = stmmac_pltfr_init(pdev, plat_dat); + ret = stmmac_pltfr_probe(pdev, plat_dat, &stmmac_res); if (ret) goto err_remove_config_dt; - ret = stmmac_dvr_probe(&pdev->dev, plat_dat, &stmmac_res); - if (ret) - goto err_exit; - return 0; -err_exit: - stmmac_pltfr_exit(pdev, plat_dat); err_remove_config_dt: if (pdev->dev.of_node) stmmac_remove_config_dt(pdev, plat_dat);