Message ID | 1487768164-43184-16-git-send-email-christophe.milard@linaro.org |
---|---|
State | Superseded |
Headers | show |
Series | driver items registration and probing | expand |
On Wed, Feb 22, 2017 at 6:55 AM, Christophe Milard < christophe.milard@linaro.org> wrote: > The remove function, as for other driver items (such as enumeratos...) is > Typo: enumerators > 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 > unbound > by the driver. > > Signed-off-by: Christophe Milard <christophe.milard@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 > >
On 22 February 2017 at 23:56, Bill Fischofer <bill.fischofer@linaro.org> wrote: > > > On Wed, Feb 22, 2017 at 6:55 AM, Christophe Milard > <christophe.milard@linaro.org> wrote: >> >> The remove function, as for other driver items (such as enumeratos...) is > > > Typo: enumerators => V2 > >> >> 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 > > > unbound => V2 Christophe > >> >> by the driver. >> >> Signed-off-by: Christophe Milard <christophe.milard@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 >> >
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 */
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.milard@linaro.org> --- include/odp/drv/spec/driver.h | 8 ++++++++ 1 file changed, 8 insertions(+) -- 2.7.4