W dniu 01.05.2014 03:48, Michal Nazarewicz pisze:
On Thu, Apr 24 2014, Andrzej Pietrasiewicz wrote:
In order for usb functions to expose OS descriptors they
need to be made aware of OS descriptors. This involves
extending the "options" structure and setting up
appropriate associations.
Signed-off-by: Andrzej Pietrasiewicz <andrzej.p@xxxxxxxxxxx>
---
drivers/usb/gadget/f_rndis.c | 24 +++++++++++++++++++++---
drivers/usb/gadget/u_rndis.h | 3 +++
2 files changed, 24 insertions(+), 3 deletions(-)
diff --git a/drivers/usb/gadget/f_rndis.c b/drivers/usb/gadget/f_rndis.c
index c11761c..b781a59 100644
--- a/drivers/usb/gadget/f_rndis.c
+++ b/drivers/usb/gadget/f_rndis.c
@@ -682,6 +682,15 @@ rndis_bind(struct usb_configuration *c, struct usb_function *f)
rndis_opts = container_of(f->fi, struct f_rndis_opts, func_inst);
+ if (cdev->use_os_string) {
+ f->os_desc_table = kcalloc(1, sizeof(*f->os_desc_table),
+ GFP_KERNEL);
Uh? It's a bit strange to always allocate 1 element table. Perhaps
just use kzalloc?
Will be kzalloc in PATCH v1.
AP
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html