Re: [RFC/PATCH 09/12] usb: gadget: composite: handle GetDescriptor(BOS)

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

 



Hello.

On 18-03-2011 16:33, Felipe Balbi wrote:

case host is asking for a BOS descriptor, we need
to it them if we have.

   I couldn't parse that. :-)

Signed-off-by: Felipe Balbi<balbi@xxxxxx>
---
  drivers/usb/gadget/composite.c |   34 ++++++++++++++++++++++++++++++++++
  1 files changed, 34 insertions(+), 0 deletions(-)

diff --git a/drivers/usb/gadget/composite.c b/drivers/usb/gadget/composite.c
index 5fe5b88..04d3e1f 100644
--- a/drivers/usb/gadget/composite.c
+++ b/drivers/usb/gadget/composite.c
@@ -617,6 +617,34 @@ static int lookup_string(
  	return -EINVAL;
  }

+static int get_bos_descriptor(struct usb_composite_dev *cdev,
+		void *buf)
+{
+	struct usb_bos_descriptor	*bos = cdev->bos;
+	const struct usb_dev_cap_header	*cap;
+	int				len = USB_BUFSIZ;
+	void				*next = buf;
+
+	if (!cdev->bos)

   You've already copied this to the 'bos' variable...

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