[PATCH 0/3] libusbg: Add support for functionfs

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Dear Matt,

Configuration of function fs based functions using config fs has been
merged to linux kernel quite long ago. To keep libusbg up to date I
have prepared patches that add support for functionfs function type.

When working with ffs I noticed that it would be a good feature to
provide device name directly to user and avoid him confusion that
instance name has to be the same as device to mount ffs. That's why I
have added structure for ffs attributes which has only one, pure
virtual (not present in configfs and read-only) attribute dev_name.

Now user can create ffs function in a two ways:

1) Pass instance name name and then get function attributes (device
name)

2) Pass NULL as instance name and pass function attributes with
desired device name

Third commit in this serie fix potential memory leak which could
take place in usbg_init(). To avoid this usbg_init() has been
refactored and now all memory should be free() properly.

I have created pull request on github with those patches [1].

Please also notice that there are still two pending patch series:

1) Remove gadget functionality [2]
This one has been changed according to your review but is still
pending for over a month.

2) Couple fixes from Philippe De Swert [3]
That's a few commits which fix errors reported by coverity.
I have reviewed this serie, build and run and it looks good
to me. Please also run through this code and merge if you
don't find anny issues.

Footnotes:
1 - https://github.com/libusbg/libusbg/pull/5
2 - http://github.com/libusbg/libusbg/pull/3
3 - http://github.com/libusbg/libusbg/pull/4

--
BR's
Krzysztof Opasiak
Samsung R&D Institute Poland
Samsung Electronics
k.opasiak@xxxxxxxxxxx



Krzysztof Opasiak (3):
  libusbg: Fix potential memory leak in usbg_init()
  libusbg: Add support for functionFS.
  libusbg: Add example to show how to create ffs functions.

 examples/Makefile.am  |    3 +-
 examples/gadget-ffs.c |  154 +++++++++++++++++++++++++++++++++++++++++++++++++
 include/usbg/usbg.h   |   14 +++++
 src/usbg.c            |   56 ++++++++++++++----
 4 files changed, 214 insertions(+), 13 deletions(-)
 create mode 100644 examples/gadget-ffs.c

-- 
1.7.9.5

--
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




[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux