[PATCH v2 00/23] libusbg: Add error code propagation and attributes refreshing.

2014-03-10 Thread Krzysztof Opasiak
Dear Matt,

I have prepared next series of patches. This time I have added error
code propagation which you have palced at todo list.

In this series I have also removed caching gadget/function/config
attributes in internal structures. Those attributes may be changed
by kernel when enabling gadget, so user should get actual attributes
each time he use usbg_get_*() function.

There was also some bug in matching between binding and function.
Previously library took only function type and ignore instance name.
Now while lookup both function type and instance name is considered.

This series depends on my previous series you can easily find them
on a list or in github pull request. 

--
BR's
Krzysztof Opasiak
Samsung R&D Institute Poland
Samsung Electronics

---
Changes since v1:
- remove conflicts description from commit messages
- fix additional whitespace

Krzysztof Opasiak (23):
  libusbg: Remove unused variables to make compiler happy.
  libusbg: Refresh gadget attributes while each get.
  libusbg: Refresh gadget strings while each get.
  libusbg: Refresh config attributes while each get.
  libusbg: Refresh config strings while each get.
  libusbg: Refresh function attributes while each get.
  libusbg: Add internal free functions for each library structure.
  libusbg: Fix wrong binding parsing.
  libusbg: Add error handling to usbg_init() and related functions.
  libusbg: Return usbg_error instead of -1 in usbg_*_len().
  libusbg: Return usbg_error instead of char* in usbg_get_*_name().
  libusbg: Add parenthesis to INSERT_TAILQ_STRING_ORDER macro.
  libusbg: Add return value to gadget creation functions.
  libusbg: Add return value to usbg_set_gadget_*() functions.
  libusbg: Add return value to usb function related functions.
  libusbg: Add return value to config related functions.
  libusbg: Add return value to usbg_enable/disable_gadget().
  libusbg: Return error code instead of NULL pointer.
  libusbg: Return error code instead of NULL pointer - config.
  libusbg: Change usbg_get_function_attrs() to return error code.
  libusbg: Return error code instead of -1.
  libusbg: Add functions for getting error strings.
  libusbg: Update examples to use returned error codes.

 examples/gadget-acm-ecm.c |   73 ++-
 examples/show-gadgets.c   |   48 +-
 include/usbg/usbg.h   |  205 --
 src/usbg.c| 1554 +
 4 files changed, 1247 insertions(+), 633 deletions(-)

-- 
1.7.9.5

--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH v2 00/23] libusbg: Add error code propagation and attributes refreshing.

2014-04-03 Thread Matt Porter
On Mon, Mar 10, 2014 at 09:42:31AM +0100, Krzysztof Opasiak wrote:
> Dear Matt,
> 
> I have prepared next series of patches. This time I have added error
> code propagation which you have palced at todo list.
> 
> In this series I have also removed caching gadget/function/config
> attributes in internal structures. Those attributes may be changed
> by kernel when enabling gadget, so user should get actual attributes
> each time he use usbg_get_*() function.

A nice improvement, thanks.

> 
> There was also some bug in matching between binding and function.
> Previously library took only function type and ignore instance name.
> Now while lookup both function type and instance name is considered.
> 
> This series depends on my previous series you can easily find them
> on a list or in github pull request. 

Applied the series.

-Matt
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html