DBG("USB_PTPREQUEST_RESET");
_reset_mtp_device();
- if (kernel_reset == FALSE) {
+ if (kernel_reset == FALSE)
kernel_reset = TRUE;
- }
status = ioctl(g_usb_fd, MTP_SEND_RESET_ACK, NULL);
if (status < 0) {
statusreq_data.code = PTP_RESPONSE_GEN_ERROR;
}
- if (statusreq_data.code == PTP_RESPONSE_DEVICEBUSY) {
+ if (statusreq_data.code == PTP_RESPONSE_DEVICEBUSY)
sent_busy = TRUE;
- } else {
+ else
sent_busy = FALSE;
- }
status = ioctl(g_usb_fd, MTP_SET_SETUP_DATA, &statusreq_data);
if (status < 0) {
if (*rx_mqid) {
res = _util_msgq_deinit(rx_mqid);
- if (res == FALSE) {
+ if (res == FALSE)
ERR("rx_mqid deinit Fail [%d]\n", errno);
- } else {
+ else
*rx_mqid = 0;
- }
}
if (*tx_mqid) {
res = _util_msgq_deinit(tx_mqid);
- if (res == FALSE) {
+ if (res == FALSE)
ERR("tx_mqid deinit fail [%d]\n", errno);
- } else {
+ else
*tx_mqid = 0;
- }
}
return res;
}
}
- if (usb_speed % MTP_MAX_PACKET_SIZE_SEND_HS) {
+ if (usb_speed % MTP_MAX_PACKET_SIZE_SEND_HS)
return MTP_MAX_PACKET_SIZE_SEND_FS;
- }
return MTP_MAX_PACKET_SIZE_SEND_HS;
}