usb: gadget: change the class of MTP interface descriptor 97/85997/3
authorDongwoo Lee <dwoo08.lee@samsung.com>
Mon, 29 Aug 2016 04:30:13 +0000 (13:30 +0900)
committerSeung-Woo Kim <sw0312.kim@samsung.com>
Wed, 31 Aug 2016 07:17:58 +0000 (00:17 -0700)
The host fails to recognize tm2(e) as gadget mode when VID is changed, even
though the matching is performed without comparing VID. This patch fixes
this issue by changing the class of MTP interface descriptor.

Change-Id: I75c1ff710c28bb7c911963bce6c8cdb328424b95
Signed-off-by: Dongwoo Lee <dwoo08.lee@samsung.com>
drivers/usb/gadget/function/f_mtp.c

index ac1b8cb..684abeb 100644 (file)
@@ -177,9 +177,9 @@ struct usb_interface_descriptor mtpg_interface_desc = {
        .bDescriptorType        = USB_DT_INTERFACE,
        .bInterfaceNumber       = 0,
        .bNumEndpoints          = 3,
-       .bInterfaceClass        = USB_CLASS_VENDOR_SPEC,
-       .bInterfaceSubClass     = USB_SUBCLASS_VENDOR_SPEC,
-       .bInterfaceProtocol     = 0,
+       .bInterfaceClass        = USB_CLASS_STILL_IMAGE,
+       .bInterfaceSubClass     = 1,
+       .bInterfaceProtocol     = 1,
 };
 
 static struct usb_interface_descriptor ptp_interface_desc = {