Received: by 2002:ad5:4acb:0:0:0:0:0 with SMTP id n11csp3442260imw; Thu, 7 Jul 2022 01:40:30 -0700 (PDT) X-Google-Smtp-Source: AGRyM1u+waXL9AeLndF4v7aDL3q04Kl4c3qVnjELiM3T8V1DJ4BhOdDr+LFTRgjWyA+9ZWSqQ42E X-Received: by 2002:a17:906:c78b:b0:722:e80c:dc82 with SMTP id cw11-20020a170906c78b00b00722e80cdc82mr44672287ejb.632.1657183229737; Thu, 07 Jul 2022 01:40:29 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1657183229; cv=none; d=google.com; s=arc-20160816; b=FyxCmc/Z+u7PdMtwAdKNT2in764RCeKgSs8NzTR6Y/lCCL5H3/fv7oSFDrT6kG8W00 ONRbbCRqCX0Sh2olY6zdJv144kLfnE0DrLSYVPaIr23jG4+gIE6st7a9nRSDkCzOs5CX VoVAEVXJ/JDOBB/HaLJ1e/U4Mcc6FfYdJ8o8v1sCoR86Gsq8rjuoKlOhWjJ9xP/IHZPX RsVktXkgy2hogyTdHnrz4MK7TsjLINgExrltXwNC42Wl1bub5B1H3/BOY5yi7zy6fk+U kgy56MgZZnsTNqej87TMAE7p6cZN4v0Kv+AABZn2NeENjcULy09B1wnZIWIyD3w+Wamt mGQA== 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=2JMkXDEWsNUyTV2UFLqYbO8oSrxA6PJmtCKjhOjVVJ4=; b=njcxzcuv5NHr/fQ5eSis2QFTLT4l5u/GR7+4vhiAh13fZWyY70A/RaZOyCCsbpmF6p dKoT6pg4ukA8ZR8liL0POI8DFGPxGnoYyZVgqQObXbj/NsQuVWLCJ1xFWWQ1EgWBiKjJ Hj9ypswLqk6Vxq561ma2+UHdr3weAgFTMyinhm9g6KENIcQ8lRDFZUR1taCTI7mxcdxY wfqLFurUNhXrFlHPjBI0+Mk5RT+1+Mc2KdivN7GcbgGe7uc/FCNNOn1b+ZHu4jXabD3T 5i+5XoS4VRSCDSjDbpDUmgaJYKyxlJOVkwkduMEBBeudNEL0IgBemE+SAGqdBHMmaGlZ eosA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=nWYmo88l; 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=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id dx26-20020a170906a85a00b007296e194403si1090609ejb.273.2022.07.07.01.40.05; Thu, 07 Jul 2022 01:40:29 -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=@gmail.com header.s=20210112 header.b=nWYmo88l; 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=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235244AbiGGIIL (ORCPT + 99 others); Thu, 7 Jul 2022 04:08:11 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53652 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235120AbiGGIIE (ORCPT ); Thu, 7 Jul 2022 04:08:04 -0400 Received: from mail-pg1-x532.google.com (mail-pg1-x532.google.com [IPv6:2607:f8b0:4864:20::532]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B30F133E24 for ; Thu, 7 Jul 2022 01:08:03 -0700 (PDT) Received: by mail-pg1-x532.google.com with SMTP id o18so15926353pgu.9 for ; Thu, 07 Jul 2022 01:08:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=2JMkXDEWsNUyTV2UFLqYbO8oSrxA6PJmtCKjhOjVVJ4=; b=nWYmo88lUUMdAAw/AyAA10vGHCXrzofBxrdXE1qJ963zAeRDuNtSuDr+VV8zmRubSq 9lUhLXxg/R4MjQ11mEQilzJuJU957zpgOqCfmn3PfrdcSeCw74kjSaKWfy4g8OM6/LL9 m+13SWwSSgiOVzEAvOch/Yr8Y5m6CyMbhf1ErWIE+EXTbEO0Z9Kw82BQQ1prM3ORrzUk VXsM4Aajba2dQA0Qav2OT3AnMxsW4zLEAfkWgRmWZEvxxioMH6pdmy++vMMk0cblfj3I Im5Gn3/9qc/1jZW+bedAApaLjpiXSJhCTcVf1JFt4aIg77Mb4E9SD8Ba098UnwN1i0VU 5v7g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=2JMkXDEWsNUyTV2UFLqYbO8oSrxA6PJmtCKjhOjVVJ4=; b=zWAgv8pzcuhHzWOOJcEjRPthjr2HFxkmoorWdAoNzWdV+w+b6jwn6wDcfS1JwYTUmv VglAXWreYLbe19AFH5jsU7eOep7a5pQjKQfzYahTeWk8InT/jPsgMs04HGahQqiI7tNi uOEUOcFZbxdh4pe0b0D9Htyh0FZpEbWksp8AHXxiIUz3Saysf/10W4B7WsXSH1KGkKji by74UEkoIPhFt+QjEpDppkbXvTs0kaCUH7iCEcGL2bgxUxSz/0MXY13+KxxbqdBsEATm uVUsD79d1EonYjhB8OVdDh0w7xRI2aSXaZtW9dmaOjCsQASqut9s3I0Vh3O14MNNRsah liPQ== X-Gm-Message-State: AJIora8tIdHgtwfj/4cuXXOCNfgZlbRZ5dL8nIGTQz/ZxQjPhsj0R4ym R63QbFUaiJNON5PykidL6yR5D+dF/X/l8g== X-Received: by 2002:a63:c006:0:b0:411:c33f:b4bb with SMTP id h6-20020a63c006000000b00411c33fb4bbmr31162443pgg.433.1657181283214; Thu, 07 Jul 2022 01:08:03 -0700 (PDT) Received: from octofox.hsd1.ca.comcast.net ([2601:641:401:1d20:a3e3:ea8c:2267:a237]) by smtp.gmail.com with ESMTPSA id p4-20020a170902e74400b0016c0c82e85csm1377374plf.75.2022.07.07.01.08.02 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 07 Jul 2022 01:08:02 -0700 (PDT) From: Max Filippov To: linux-xtensa@linux-xtensa.org Cc: Chris Zankel , linux-kernel@vger.kernel.org, Yang Yingliang , Max Filippov Subject: [PATCH 2/3] xtensa: iss/network: provide release() callback Date: Thu, 7 Jul 2022 01:08:00 -0700 Message-Id: <20220707080801.3496148-3-jcmvbkbc@gmail.com> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20220707080801.3496148-1-jcmvbkbc@gmail.com> References: <20220707080801.3496148-1-jcmvbkbc@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=0.4 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM, FROM_LOCAL_NOVOWEL,HK_RANDOM_ENVFROM,HK_RANDOM_FROM,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=no 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 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 --- 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 2d566231688f..2a22e80a488d 100644 --- a/arch/xtensa/platforms/iss/network.c +++ b/arch/xtensa/platforms/iss/network.c @@ -466,6 +466,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; @@ -516,6 +525,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.30.2