Received: by 2002:a05:6358:4e97:b0:b3:742d:4702 with SMTP id ce23csp3026558rwb; Mon, 15 Aug 2022 16:24:40 -0700 (PDT) X-Google-Smtp-Source: AA6agR7GnN+ehCdf3H5S9GL/Pjcmhl1eq7jxsK5eELWfD9mqsGANPvdGTqurCTNJ/YQZWv3jrSJd X-Received: by 2002:a17:907:97cb:b0:731:6d1:13fa with SMTP id js11-20020a17090797cb00b0073106d113famr11547283ejc.375.1660605880609; Mon, 15 Aug 2022 16:24:40 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1660605880; cv=none; d=google.com; s=arc-20160816; b=mEH6bZGTlXpHpqhrNmImfpyanSbibsKAbkygot61JXHJZkrlxg9K0JEXTA1KeZ6CD1 NqV2azu1TgfHWW/tedPzVOnoQ6+yW5MVhFHRr94vxGEXZDigxiU5rAJRBJryjNyppmZ7 j1xhOo6QhYOKSGNHqb8s2/bfpCSLLk+m28UqwTFfih1qNwywpw5W79k6ywu6OOarTKSA VQOnkLPTywHRneNOS1rLLSDXDt1hcCkw0fE7kigt6S/QGS4YTaOKLUpSKlxPluYijlfk JHnCdZdtrvewCZaH8w/Nc72WvN7ML0VfCCo/hjNEs+6n6c0M1blJYYxYZEs0QlQ73vpA Kd4w== 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=cx184V/w5kV2fMAMVmghsKiJFnyQcMhhP3u3hDrkrNw=; b=ga2CbSxqaX65d2J9CUtZqhdLHGM4S8a7TR31nbl0sWZYeiFFIMCi7M6PXJ3q5kHZZg WiitjOs5i8af97Q7x9Ge7PIwQ3lf5e6czL6zkxwxj5uYOBgcyzyoDfyWPjS3BEOu45PQ 5K1SKAcW7E1tck/PV1lqseulem08PQyw5/babmJMfP+9X+13i1QBJHbME9GGcHWwmmnV fqAj1UCCf7/1vsH6o6D8FobOFHh6ib2SiRUfhf5Bm6Ov1LgzEKMA2o35O7YgoQcos3wX 0nIQozrtgjobVDlUU5PgralKFya01Q5UiUGKeP6v1+T24awyrEFRdkWHKsd6nkRNrT6b de0A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=ldZ04HBm; 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 sa15-20020a1709076d0f00b00730551afa8esi9736397ejc.885.2022.08.15.16.24.15; Mon, 15 Aug 2022 16:24:40 -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=ldZ04HBm; 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 S1346996AbiHOWII (ORCPT + 99 others); Mon, 15 Aug 2022 18:08:08 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34650 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232710AbiHOWCc (ORCPT ); Mon, 15 Aug 2022 18:02:32 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6BDB682D01; Mon, 15 Aug 2022 12:37:06 -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 dfw.source.kernel.org (Postfix) with ESMTPS id 9A10761089; Mon, 15 Aug 2022 19:37:05 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 96580C433C1; Mon, 15 Aug 2022 19:37:04 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1660592225; bh=e+q/+ylgS+4pckBS7ntgLisdifqqYTOfxAfl92z1mJE=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=ldZ04HBmFzXqkl1zQdxa01gsLCsC0EdZkwybkz1w0gyPmev5bTlLMCAYDrpH/oYlo 6sXNjVmDqrzi9jzl1M9VRUop3CKX7IijlpPwHI7KaAuuXQlrbrH6pRtJ0GUwfJp26D 5YaVgjWa+Ydg6T0yxPyI9Xm4bagiV1fYWnzooAjg= 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.18 0752/1095] xtensa: iss/network: provide release() callback Date: Mon, 15 Aug 2022 20:02:31 +0200 Message-Id: <20220815180500.450054728@linuxfoundation.org> X-Mailer: git-send-email 2.37.2 In-Reply-To: <20220815180429.240518113@linuxfoundation.org> References: <20220815180429.240518113@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 be3aaaad8bee..24f162bd5874 100644 --- a/arch/xtensa/platforms/iss/network.c +++ b/arch/xtensa/platforms/iss/network.c @@ -503,6 +503,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; @@ -559,6 +568,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