DM USB: clean-up: change name of function usb_dev_comp_req
Change it to usb_dev_comp_cb, which is more accurate for what it does. This patch doesn't change original program logic. Tracked-On: #3054 Signed-off-by: Xiaoguang Wu <xiaoguang.wu@intel.com> Acked-by: Yu Wang <yu1.wang@intel.com>
This commit is contained in:
parent
7dbde27615
commit
1be719c630
|
@ -170,7 +170,7 @@ libusb_speed_to_usb_speed(int libusb_speed)
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
usb_dev_comp_req(struct libusb_transfer *trn)
|
usb_dev_comp_cb(struct libusb_transfer *trn)
|
||||||
{
|
{
|
||||||
struct usb_dev_req *r;
|
struct usb_dev_req *r;
|
||||||
struct usb_data_xfer *xfer;
|
struct usb_data_xfer *xfer;
|
||||||
|
@ -255,6 +255,7 @@ usb_dev_comp_req(struct libusb_transfer *trn)
|
||||||
done = trn->actual_length;
|
done = trn->actual_length;
|
||||||
|
|
||||||
while (i < r->blk_count) {
|
while (i < r->blk_count) {
|
||||||
|
|
||||||
if (trn->type == LIBUSB_TRANSFER_TYPE_ISOCHRONOUS) {
|
if (trn->type == LIBUSB_TRANSFER_TYPE_ISOCHRONOUS) {
|
||||||
buf_idx = 0;
|
buf_idx = 0;
|
||||||
buf = libusb_get_iso_packet_buffer_simple(trn, j);
|
buf = libusb_get_iso_packet_buffer_simple(trn, j);
|
||||||
|
@ -885,16 +886,16 @@ usb_dev_data(void *pdata, struct usb_data_xfer *xfer, int dir, int epctx)
|
||||||
|
|
||||||
if (type == USB_ENDPOINT_BULK) {
|
if (type == USB_ENDPOINT_BULK) {
|
||||||
libusb_fill_bulk_transfer(r->trn, udev->handle, epid,
|
libusb_fill_bulk_transfer(r->trn, udev->handle, epid,
|
||||||
r->buffer, data_size, usb_dev_comp_req, r, 0);
|
r->buffer, data_size, usb_dev_comp_cb, r, 0);
|
||||||
|
|
||||||
} else if (type == USB_ENDPOINT_INT) {
|
} else if (type == USB_ENDPOINT_INT) {
|
||||||
libusb_fill_interrupt_transfer(r->trn, udev->handle, epid,
|
libusb_fill_interrupt_transfer(r->trn, udev->handle, epid,
|
||||||
r->buffer, data_size, usb_dev_comp_req, r, 0);
|
r->buffer, data_size, usb_dev_comp_cb, r, 0);
|
||||||
|
|
||||||
} else if (type == USB_ENDPOINT_ISOC) {
|
} else if (type == USB_ENDPOINT_ISOC) {
|
||||||
libusb_fill_iso_transfer(r->trn, udev->handle, epid,
|
libusb_fill_iso_transfer(r->trn, udev->handle, epid,
|
||||||
r->buffer, data_size, framecnt,
|
r->buffer, data_size, framecnt,
|
||||||
usb_dev_comp_req, r, 0);
|
usb_dev_comp_cb, r, 0);
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
UPRINTF(LFTL, "%s: wrong endpoint type %d\r\n", __func__, type);
|
UPRINTF(LFTL, "%s: wrong endpoint type %d\r\n", __func__, type);
|
||||||
|
|
Loading…
Reference in New Issue