diff options
author | Johan Hovold <johan@hovoldconsulting.com> | 2015-11-04 18:55:22 +0100 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@google.com> | 2015-11-04 20:35:18 -0800 |
commit | c1700479845bc36cb48719b2ae341d4df89a73f6 (patch) | |
tree | 60aefe5a11e470a52aa53cc81e5962422df262b9 /drivers/staging/greybus/hd.h | |
parent | b4bd3617ed069a0aae701ed451cb6ec370fbd45f (diff) |
greybus: hd: fix host-device life time issues
Fix host-device life time issues by separating host-device allocation
from registration.
This is needed both to make sure that all host-device resources are
available before registering the device and to prevent such resources
from being deallocated while the device is still in use during device
removal.
This specifically fixes the following warnings during es1 and es2
disconnect:
usb 1-1.1: No free CPort OUT urbs, having to dynamically allocate one!
Signed-off-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 | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/staging/greybus/hd.h b/drivers/staging/greybus/hd.h index 91fcccb46df1..6724cfea1e19 100644 --- a/drivers/staging/greybus/hd.h +++ b/drivers/staging/greybus/hd.h @@ -52,6 +52,8 @@ struct gb_host_device *gb_hd_create(struct gb_hd_driver *driver, struct device *parent, size_t buffer_size_max, size_t num_cports); -void gb_hd_remove(struct gb_host_device *hd); +int gb_hd_add(struct gb_host_device *hd); +void gb_hd_del(struct gb_host_device *hd); +void gb_hd_put(struct gb_host_device *hd); #endif /* __HD_H */ |