Loading drivers/usb/gadget/function/f_mtp.c +11 −2 Original line number Diff line number Diff line Loading @@ -330,10 +330,12 @@ struct mtp_ext_config_desc_function { }; /* MTP Extended Configuration Descriptor */ struct { struct mtp_ext_config_desc { struct mtp_ext_config_desc_header header; struct mtp_ext_config_desc_function function; } mtp_ext_config_desc = { }; static struct mtp_ext_config_desc mtp_ext_config_desc = { .header = { .dwLength = __constant_cpu_to_le32(sizeof(mtp_ext_config_desc)), .bcdVersion = __constant_cpu_to_le16(0x0100), Loading Loading @@ -1271,6 +1273,13 @@ static int mtp_ctrlrequest(struct usb_composite_dev *cdev, value = (w_length < sizeof(mtp_ext_config_desc) ? w_length : sizeof(mtp_ext_config_desc)); memcpy(cdev->req->buf, &mtp_ext_config_desc, value); /* update compatibleID if PTP */ if (dev->function.fs_descriptors == fs_ptp_descs) { struct mtp_ext_config_desc *d = cdev->req->buf; d->function.compatibleID[0] = 'P'; } } } else if ((ctrl->bRequestType & USB_TYPE_MASK) == USB_TYPE_CLASS) { DBG(cdev, "class request: %d index: %d value: %d length: %d\n", Loading Loading
drivers/usb/gadget/function/f_mtp.c +11 −2 Original line number Diff line number Diff line Loading @@ -330,10 +330,12 @@ struct mtp_ext_config_desc_function { }; /* MTP Extended Configuration Descriptor */ struct { struct mtp_ext_config_desc { struct mtp_ext_config_desc_header header; struct mtp_ext_config_desc_function function; } mtp_ext_config_desc = { }; static struct mtp_ext_config_desc mtp_ext_config_desc = { .header = { .dwLength = __constant_cpu_to_le32(sizeof(mtp_ext_config_desc)), .bcdVersion = __constant_cpu_to_le16(0x0100), Loading Loading @@ -1271,6 +1273,13 @@ static int mtp_ctrlrequest(struct usb_composite_dev *cdev, value = (w_length < sizeof(mtp_ext_config_desc) ? w_length : sizeof(mtp_ext_config_desc)); memcpy(cdev->req->buf, &mtp_ext_config_desc, value); /* update compatibleID if PTP */ if (dev->function.fs_descriptors == fs_ptp_descs) { struct mtp_ext_config_desc *d = cdev->req->buf; d->function.compatibleID[0] = 'P'; } } } else if ((ctrl->bRequestType & USB_TYPE_MASK) == USB_TYPE_CLASS) { DBG(cdev, "class request: %d index: %d value: %d length: %d\n", Loading