Received: by 2002:a05:6358:4e97:b0:b3:742d:4702 with SMTP id ce23csp2887113rwb; Mon, 15 Aug 2022 13:20:02 -0700 (PDT) X-Google-Smtp-Source: AA6agR57P9DliOw6ZLpPhrroJFONOzVj2JG3Q6e7DNfGzASRQE8V6bGJjZhgDvu3tST71A//jOys X-Received: by 2002:a17:907:2e0d:b0:731:7afa:f14f with SMTP id ig13-20020a1709072e0d00b007317afaf14fmr11980816ejc.704.1660594717134; Mon, 15 Aug 2022 13:18:37 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1660594717; cv=none; d=google.com; s=arc-20160816; b=OpTjzb3yHL7HekIpxIwd54nyIKh2YirPnl9/Taslh9dzV+eC0zRIZR5w16IDeACMPL CA2/CPAixcP5Ol0HcJuqXMxbz++2H361p3PsouIL9tmUb5RMKNBdDmXOagVtPA4hjwEf QwEbKmUWc2X0uHmozCKab/Of8fdC+FlnuifZzBy5KiO+BwnPg8rk+EX32hXCjYiinDwv ezvljpbD5nXgnTsVmYepLm3mCel2SAwNdU3ipRfUe/U0N11ejnCsOo6Kx8kFOs1BGhhD 5UMj3PTyT4m6/N5dSr0Tho7wAALpY4l6CDf89ugZMhO0or+ohr0KASDrFtslh76RMJnT ocBw== 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 :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=ibpqKfPoLb1JVHmpd47xv6U6FukBVfq+yvgUIYsLig4=; b=aq921ss6INyZjgrTDNHWQ5ZlSSSecAyZ2BlHiOvh9nePWB+h0myS8vLrKXHyVczwSH S2ooCrlDIpm1MUpqvBtuYQgM+47J8dN+/R1woNo03OPS3xO4rRYC1AiR8+rLXA2gVXoY Gdt0w2zI2la9vgSHlE0iPnOdnmt24frzxVk/PUow8oRueWpXjSNtUwMvL2vtJLgIrbGq jzMrn3/QChkwjwj7eh3QO/CyrkmcbHtPo2KyMfogFal2JKWA11Zq56Y+dk70hAjg+6/w 8InObDl02voHNDIJnSOyAiJoMi/Oq457PWvQHKrZ+yBcMx1UGrUqHRjzwTbWsYkfr+v2 scrA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b="nFlCN/iC"; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id qa7-20020a170907868700b0073092b8be95si9341320ejc.705.2022.08.15.13.18.11; Mon, 15 Aug 2022 13:18:37 -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=@linuxfoundation.org header.s=korg header.b="nFlCN/iC"; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S245069AbiHOTYg (ORCPT + 99 others); Mon, 15 Aug 2022 15:24:36 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55182 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S245060AbiHOTWb (ORCPT ); Mon, 15 Aug 2022 15:22:31 -0400 Received: from sin.source.kernel.org (sin.source.kernel.org [IPv6:2604:1380:40e1:4800::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6633B59270; Mon, 15 Aug 2022 11:40:39 -0700 (PDT) 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 sin.source.kernel.org (Postfix) with ESMTPS id 2AA2BCE1268; Mon, 15 Aug 2022 18:40:37 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 12EC6C433C1; Mon, 15 Aug 2022 18:40:34 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1660588835; bh=+xyQPqQ4x+0wzOxEiX4hNX96Q1C0zM0bt8z0jZmfowU=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=nFlCN/iCs2uPBGH1OWBJ6YDKyCfbxQHxKYTmzgSOtoPpyeck72cldVaoKwILAObyf ls4nzzVUsTum6F3ryevDrfqpha9s8e5o3sl0CLlZuV+0OucHecdeSKKhTGr4NNWmcf O2XLbZsQEzcV87WLmrl14VHD3YIt4CIXSsa4M/i0= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Max Filippov , Sasha Levin Subject: [PATCH 5.15 488/779] xtensa: iss/network: provide release() callback Date: Mon, 15 Aug 2022 20:02:12 +0200 Message-Id: <20220815180358.122109382@linuxfoundation.org> X-Mailer: git-send-email 2.37.2 In-Reply-To: <20220815180337.130757997@linuxfoundation.org> References: <20220815180337.130757997@linuxfoundation.org> User-Agent: quilt/0.67 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-7.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS,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: X-Mailing-List: linux-kernel@vger.kernel.org From: Max Filippov [ Upstream commit 8864fb8359682912ee99235db7db916733a1fd7b ] Provide release() callback for the platform device embedded into struct iss_net_private and registered in the iss_net_configure so that platform_device_unregister could be called for it. Signed-off-by: Max Filippov Signed-off-by: Sasha Levin --- arch/xtensa/platforms/iss/network.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/arch/xtensa/platforms/iss/network.c b/arch/xtensa/platforms/iss/network.c index 4986226a5ab2..4801df4e73e1 100644 --- a/arch/xtensa/platforms/iss/network.c +++ b/arch/xtensa/platforms/iss/network.c @@ -502,6 +502,15 @@ static const struct net_device_ops iss_netdev_ops = { .ndo_set_rx_mode = iss_net_set_multicast_list, }; +static void iss_net_pdev_release(struct device *dev) +{ + struct platform_device *pdev = to_platform_device(dev); + struct iss_net_private *lp = + container_of(pdev, struct iss_net_private, pdev); + + free_netdev(lp->dev); +} + static int iss_net_configure(int index, char *init) { struct net_device *dev; @@ -558,6 +567,7 @@ static int iss_net_configure(int index, char *init) lp->pdev.id = index; lp->pdev.name = DRIVER_NAME; + lp->pdev.dev.release = iss_net_pdev_release; platform_device_register(&lp->pdev); SET_NETDEV_DEV(dev, &lp->pdev.dev); -- 2.35.1