Re: [PATCH 14/20] usb/gadget: push iSerialNumber into gadgets

2012-08-27 Thread Michal Nazarewicz
Sebastian Andrzej Siewior writes: > On 08/27/2012 03:51 PM, Michal Nazarewicz wrote: >>> And how do you achieve the "" initialization? This macro is >>> evaluated after the id has been assigned. >> Ah, right, I've forgotten that usb_string_ids_tab iterates till it finds >> a NULL pointer. > not

Re: [PATCH 14/20] usb/gadget: push iSerialNumber into gadgets

2012-08-27 Thread Sebastian Andrzej Siewior
On 08/27/2012 03:51 PM, Michal Nazarewicz wrote: And how do you achieve the "" initialization? This macro is evaluated after the id has been assigned. Ah, right, I've forgotten that usb_string_ids_tab iterates till it finds a NULL pointer. not only usb_string_ids_tab iterates() but also the l

Re: [PATCH 14/20] usb/gadget: push iSerialNumber into gadgets

2012-08-27 Thread Michal Nazarewicz
Sebastian Andrzej Siewior writes: > On 08/25/2012 12:07 AM, Michal Nazarewicz wrote: >>> --- a/drivers/usb/gadget/acm_ms.c >>> +++ b/drivers/usb/gadget/acm_ms.c >>> @@ -92,12 +92,14 @@ static const struct usb_descriptor_header *otg_desc[] = >>> { >>> >>> #define STRING_MANUFACTURER_IDX

Re: [PATCH 14/20] usb/gadget: push iSerialNumber into gadgets

2012-08-27 Thread Sebastian Andrzej Siewior
On 08/25/2012 12:07 AM, Michal Nazarewicz wrote: --- a/drivers/usb/gadget/acm_ms.c +++ b/drivers/usb/gadget/acm_ms.c @@ -92,12 +92,14 @@ static const struct usb_descriptor_header *otg_desc[] = { #define STRING_MANUFACTURER_IDX 0 #define STRING_PRODUCT_IDX1 +#define

Re: [PATCH 14/20] usb/gadget: push iSerialNumber into gadgets

2012-08-24 Thread Michal Nazarewicz
Sebastian Andrzej Siewior writes: > This patch pushes the iSerialNumber module argument from composite into > each gadget. Each gadgets holds a dummy strings in its "struct > usb_string" to ensure that usb_string_ids_tab() allocates a valid id. > Once the user uses the module paramter, the string

[PATCH 14/20] usb/gadget: push iSerialNumber into gadgets

2012-08-24 Thread Sebastian Andrzej Siewior
This patch pushes the iSerialNumber module argument from composite into each gadget. Each gadgets holds a dummy strings in its "struct usb_string" to ensure that usb_string_ids_tab() allocates a valid id. Once the user uses the module paramter, the string is overwritten with the final value. This i