Message ID | 1490194110-40168-18-git-send-email-christophe.milard@linaro.org |
---|---|
State | New |
Headers | show
Delivered-To: patch@linaro.org Received: by 10.182.3.34 with SMTP id 2csp230942obz; Wed, 22 Mar 2017 07:05:45 -0700 (PDT) X-Received: by 10.237.53.113 with SMTP id b46mr37335501qte.119.1490191545751; Wed, 22 Mar 2017 07:05:45 -0700 (PDT) Return-Path: <lng-odp-bounces@lists.linaro.org> Received: from lists.linaro.org (lists.linaro.org. [54.225.227.206]) by mx.google.com with ESMTP id i29si1166452qtf.101.2017.03.22.07.05.45; Wed, 22 Mar 2017 07:05:45 -0700 (PDT) Received-SPF: pass (google.com: domain of lng-odp-bounces@lists.linaro.org designates 54.225.227.206 as permitted sender) client-ip=54.225.227.206; Authentication-Results: mx.google.com; spf=pass (google.com: domain of lng-odp-bounces@lists.linaro.org designates 54.225.227.206 as permitted sender) smtp.mailfrom=lng-odp-bounces@lists.linaro.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: by lists.linaro.org (Postfix, from userid 109) id DBF0060A47; Wed, 22 Mar 2017 14:05:31 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on ip-10-142-244-252 X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL, URIBL_BLOCKED autolearn=disabled version=3.4.0 Received: from [127.0.0.1] (localhost [127.0.0.1]) by lists.linaro.org (Postfix) with ESMTP id C043D642D9; Wed, 22 Mar 2017 13:51:22 +0000 (UTC) X-Original-To: lng-odp@lists.linaro.org Delivered-To: lng-odp@lists.linaro.org Received: by lists.linaro.org (Postfix, from userid 109) id 2CF136430D; Wed, 22 Mar 2017 13:51:13 +0000 (UTC) Received: from mail-wm0-f53.google.com (mail-wm0-f53.google.com [74.125.82.53]) by lists.linaro.org (Postfix) with ESMTPS id 1530B642B5 for <lng-odp@lists.linaro.org>; Wed, 22 Mar 2017 13:49:33 +0000 (UTC) Received: by mail-wm0-f53.google.com with SMTP id t189so38383024wmt.1 for <lng-odp@lists.linaro.org>; Wed, 22 Mar 2017 06:49:33 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=m1G+n1kKPwCGBzdcSYe97aJTcR92hiGjd/LV1sHMe5E=; b=nsTV6uy09IvSrhHDrtC+TH+b8BFXd2ldR3ssDi5ltHv9IYRYI+V7E/YnEnu15h+aI0 0NC7bYQlXOiWvnyV7Laz4/6Z3HCA+jfsKj3ttT576s08m2+9YtE8aduXG2tCZpHnItL4 8B51oNgbKFIgEQ9oOfs/bFqSP3dh5tsccH6tTFtz/CIzVIyHwjk/+knAOBW/cijB6BLU gM3ifyr8jc1QOqOJ6nb/enGZo/GKI44w85WI7nH/Jy4YwoPlRmHZ1tMl99YN+oFZdncY cbq56PQWEPMUCoREplF9MWyvQShGpd1S7mTyvnoEH6VwjVXQD1Ufw0ytyPZlEoNHLb5a mIgA== X-Gm-Message-State: AFeK/H1WjV9RfNEIjmpmlUumm5rUpcaiy1s4eoU7DsgU+D83IlpboqO8BMjVsE98XyHaei0ETxo= X-Received: by 10.25.115.19 with SMTP id o19mr995300lfc.162.1490190571984; Wed, 22 Mar 2017 06:49:31 -0700 (PDT) Received: from erachmi-ericsson.ki.sw.ericsson.se (c-83-233-76-66.cust.bredband2.com. [83.233.76.66]) by smtp.gmail.com with ESMTPSA id l23sm522305lfk.27.2017.03.22.06.49.31 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 22 Mar 2017 06:49:31 -0700 (PDT) From: Christophe Milard <christophe.milard@linaro.org> To: yi.he@linaro.org, bill.fischofer@linaro.org, lng-odp@lists.linaro.org Date: Wed, 22 Mar 2017 15:48:24 +0100 Message-Id: <1490194110-40168-18-git-send-email-christophe.milard@linaro.org> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1490194110-40168-1-git-send-email-christophe.milard@linaro.org> References: <1490194110-40168-1-git-send-email-christophe.milard@linaro.org> Subject: [lng-odp] [API-NEXT PATCHv2 17/23] drv: adding driver remove function X-BeenThere: lng-odp@lists.linaro.org X-Mailman-Version: 2.1.16 Precedence: list List-Id: "The OpenDataPlane \(ODP\) List" <lng-odp.lists.linaro.org> List-Unsubscribe: <https://lists.linaro.org/mailman/options/lng-odp>, <mailto:lng-odp-request@lists.linaro.org?subject=unsubscribe> List-Archive: <http://lists.linaro.org/pipermail/lng-odp/> List-Post: <mailto:lng-odp@lists.linaro.org> List-Help: <mailto:lng-odp-request@lists.linaro.org?subject=help> List-Subscribe: <https://lists.linaro.org/mailman/listinfo/lng-odp>, <mailto:lng-odp-request@lists.linaro.org?subject=subscribe> Errors-To: lng-odp-bounces@lists.linaro.org Sender: "lng-odp" <lng-odp-bounces@lists.linaro.org> |
Series |
driver items registration and probing
|
expand
|
diff --git a/include/odp/drv/spec/driver.h b/include/odp/drv/spec/driver.h index f89c282..394aa92 100644 --- a/include/odp/drv/spec/driver.h +++ b/include/odp/drv/spec/driver.h @@ -336,6 +336,14 @@ struct odpdrv_driver_param_t { int (*unbind)(odpdrv_device_t dev, void (*callback)(odpdrv_device_t dev), uint32_t flags); + + /** remove function: + * remove any resource taken by the driver. Called when the driver + * itself is to be removed, i.e. after all devices are unbound + * Can be set to NULL if the driver has nothing to release. + * + */ + int (*remove)(void); }; /** The callback function must be called mmediately by the current ODP thread */
The remove function, as for other driver items (such as enumerators...) is called before the driver is to be removed, i.e. after all devices have been been unbound from the driver. remove() should release any resource held by the driver. Signed-off-by: Christophe Milard <christophe.milard@linaro.org> --- include/odp/drv/spec/driver.h | 8 ++++++++ 1 file changed, 8 insertions(+) -- 2.7.4