On 11/08/2012 03:21 PM, Felipe Balbi wrote:
On Wed, Nov 07, 2012 at 07:23:53PM +0100, Sebastian Andrzej Siewior wrote:

missing commit log

added

|This patch converts the f_sourcesink file to the USB-function module.
|This patch also introduces a ss_check_param() function which checks if
|the config arguments are valid.

Signed-off-by: Sebastian Andrzej Siewior<bige...@linutronix.de>
---
  drivers/usb/gadget/Kconfig        |    4 +
  drivers/usb/gadget/Makefile       |    3 +
  drivers/usb/gadget/f_sourcesink.c |  193 ++++++++++++++++++++++++++-----------
  drivers/usb/gadget/zero.c         |   97 +++++++++++++++++--
  4 files changed, 235 insertions(+), 62 deletions(-)

diff --git a/drivers/usb/gadget/Kconfig b/drivers/usb/gadget/Kconfig
index d381d720..881cd63 100644
--- a/drivers/usb/gadget/Kconfig
+++ b/drivers/usb/gadget/Kconfig
@@ -500,6 +500,9 @@ config USB_LIBCOMPOSITE
        tristate
        depends on USB_GADGET

+config USB_F_SOURCESINK
+       tristate
+
  choice
        tristate "USB Gadget Drivers"
        default USB_ETH
@@ -524,6 +527,7 @@ choice
  config USB_ZERO
        tristate "Gadget Zero (DEVELOPMENT)"
        select USB_LIBCOMPOSITE
+       select USB_F_SOURCESINK

select will force USB_F_SOURCESINK to 'y'.

Why? USB_ZERO is tristate and USB_F_SOURCESINK is tristate.
I do have drivers/usb/gadget/f_sourcesink.ko.

diff --git a/drivers/usb/gadget/Makefile b/drivers/usb/gadget/Makefile
index fa65050..a68f306 100644
--- a/drivers/usb/gadget/Makefile
+++ b/drivers/usb/gadget/Makefile
@@ -76,3 +76,6 @@ obj-$(CONFIG_USB_G_WEBCAM)    += g_webcam.o
  obj-$(CONFIG_USB_G_NCM)               += g_ncm.o
  obj-$(CONFIG_USB_G_ACM_MS)    += g_acm_ms.o
  obj-$(CONFIG_USB_GADGET_TARGET)       += tcm_usb_gadget.o
+
+# USB Functions
+obj-$(CONFIG_USB_F_SOURCESINK) += f_sourcesink.o
diff --git a/drivers/usb/gadget/f_sourcesink.c 
b/drivers/usb/gadget/f_sourcesink.c
index 1afe562..8e5591e 100644
--- a/drivers/usb/gadget/f_sourcesink.c
+++ b/drivers/usb/gadget/f_sourcesink.c
@@ -321,6 +375,10 @@ sourcesink_bind(struct usb_configuration *c, struct 
usb_function *f)
        int     id;
        int ret;

+       ret = ss_check_param();
+       if (ret)
+               return ret;

looks like ss_check_param() doesn't fit $SUBJECT.

added something to the patch description (unless you want this out).

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

Reply via email to