[<prev] [next>] [day] [month] [year] [list]
Message-Id: <1338403417-28156-1-git-send-email-koen.beel.barco@gmail.com>
Date: Wed, 30 May 2012 20:43:37 +0200
From: Koen Beel <koen.beel@...il.com>
To: balbi@...com, gregkh@...uxfoundation.org, mina86@...a86.com
Cc: linux-usb@...r.kernel.org, linux-kernel@...r.kernel.org,
Koen Beel <koen.beel.barco@...il.com>,
Koen Beel <koen.beel@...co.com>
Subject: [PATCH] FunctionFS: add HID descriptor support.
When writing the descriptors to the ep0 file of functionfs, the HID descriptors where not recognized which caused the initialization from user space to fail.
Signed-off-by: Koen Beel <koen.beel@...co.com>
---
drivers/usb/gadget/f_fs.c | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/drivers/usb/gadget/f_fs.c b/drivers/usb/gadget/f_fs.c
index dcd1c7f..8adc79d 100644
--- a/drivers/usb/gadget/f_fs.c
+++ b/drivers/usb/gadget/f_fs.c
@@ -21,6 +21,7 @@
#include <linux/blkdev.h>
#include <linux/pagemap.h>
#include <linux/export.h>
+#include <linux/hid.h>
#include <asm/unaligned.h>
#include <linux/usb/composite.h>
@@ -1671,6 +1672,12 @@ static int __must_check ffs_do_desc(char *data, unsigned len,
}
break;
+ case HID_DT_HID:
+ pr_vdebug("hid descriptor\n");
+ if (length != sizeof(struct hid_descriptor))
+ goto inv_length;
+ break;
+
case USB_DT_OTG:
if (length != sizeof(struct usb_otg_descriptor))
goto inv_length;
--
1.7.9.5
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists