From 95098476e89a82c037e1cec1ef92538b54e8886e Mon Sep 17 00:00:00 2001 From: Dongwoo Lee Date: Mon, 29 Aug 2016 13:30:13 +0900 Subject: [PATCH] usb: gadget: change the class of MTP interface descriptor 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 --- drivers/usb/gadget/function/f_mtp.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/usb/gadget/function/f_mtp.c b/drivers/usb/gadget/function/f_mtp.c index ac1b8cb..684abeb 100644 --- a/drivers/usb/gadget/function/f_mtp.c +++ b/drivers/usb/gadget/function/f_mtp.c @@ -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 = { -- 2.7.4