Re: [PATCH] usb: gadget: Add get_alt function for f_sourcesink

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

 



On 4/11/2012 5:34 PM, Sergei Shtylyov wrote:
Hello.

On 11-04-2012 13:15, Pratyush Anand wrote:

This patch is based on patch "usb: gadget: add isochronous support to
gadget zero" from Paul Zimmerman.
Above patch adds one more interface with Alternate Setting '1'. Now, if
get_alt is not defined then, composite driver always returns alternate
setting '0'. So, implemented get_alt to return correct alternate
settings.

Signed-off-by: Pratyush Anand<pratyush.anand@xxxxxx>
---
   drivers/usb/gadget/f_sourcesink.c |   12 ++++++++++++
   1 files changed, 12 insertions(+), 0 deletions(-)

diff --git a/drivers/usb/gadget/f_sourcesink.c b/drivers/usb/gadget/f_sourcesink.c
index 911e6f3..3ffdf86 100644
--- a/drivers/usb/gadget/f_sourcesink.c
+++ b/drivers/usb/gadget/f_sourcesink.c
[...]
@@ -744,6 +747,14 @@ static int sourcesink_set_alt(struct usb_function *f,
   	return enable_source_sink(cdev, ss, alt);
   }

+static int sourcesink_get_alt(struct usb_function *f, unsigned intf)
+{
+	struct f_sourcesink             *ss =
+		func_to_ss(f);

     Why break the short enough line here?


correct, But may be Paul will merge it with his patch.
So, He can take care.

Regards
Pratyush

WBR, Sergei
.


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