diff options
author | Vaibhav Agarwal <vaibhav.agarwal@linaro.org> | 2016-05-27 10:49:23 +0530 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@google.com> | 2016-05-27 11:27:28 -0700 |
commit | 29a822bdf77a0c2af5b556506f3cf3175a9a4a98 (patch) | |
tree | 4ec904997a970e1bcf709f5d778aa79847d130d6 /drivers/staging/greybus/hd.h | |
parent | cb4c8441e5dac4994ab63c1426babda3102beda9 (diff) |
greybus: hd: Add API to release reserved CPorts
It is required to release all unique ids registered via ida_get_simple
to avoid any possible memory leak. cport_release() already exists with
special handling for ES2_CPORT_CDSI1, i.e. updating in_use flag without
removing associated ida.
So, added another API to release reserved cports CDSI0 and CDSI1. This
is intended to be used only during es2_destroy().
Signed-off-by: Vaibhav Agarwal <vaibhav.agarwal@linaro.org>
Reviewed-by: Johan Hovold <johan@hovoldconsulting.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Diffstat (limited to 'drivers/staging/greybus/hd.h')
-rw-r--r-- | drivers/staging/greybus/hd.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/staging/greybus/hd.h b/drivers/staging/greybus/hd.h index 8510816c1796..ad229622654e 100644 --- a/drivers/staging/greybus/hd.h +++ b/drivers/staging/greybus/hd.h @@ -61,6 +61,7 @@ struct gb_host_device { #define to_gb_host_device(d) container_of(d, struct gb_host_device, dev) int gb_hd_cport_reserve(struct gb_host_device *hd, u16 cport_id); +void gb_hd_cport_release_reserved(struct gb_host_device *hd, u16 cport_id); int gb_hd_cport_allocate(struct gb_host_device *hd, int cport_id, unsigned long flags); void gb_hd_cport_release(struct gb_host_device *hd, u16 cport_id); |