The remove function, as for other driver items (such as enumeratos...) is
called before the driver is to be removed, i.e. after all devices have been
been unboud from the driver. remove() should release any resource held
by the driver.

Signed-off-by: Christophe Milard <christophe.mil...@linaro.org>
---
 include/odp/drv/spec/driver.h | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/include/odp/drv/spec/driver.h b/include/odp/drv/spec/driver.h
index 0b62c1b..221a6ce 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 
*/
-- 
2.7.4

Reply via email to