Skip to content

Commit 1be719c

Browse files
xiaoguangwuacrnsi
authored andcommitted
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>
1 parent 7dbde27 commit 1be719c

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

devicemodel/hw/platform/usb_pmapper.c

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -170,7 +170,7 @@ libusb_speed_to_usb_speed(int libusb_speed)
170170
}
171171

172172
static void
173-
usb_dev_comp_req(struct libusb_transfer *trn)
173+
usb_dev_comp_cb(struct libusb_transfer *trn)
174174
{
175175
struct usb_dev_req *r;
176176
struct usb_data_xfer *xfer;
@@ -255,6 +255,7 @@ usb_dev_comp_req(struct libusb_transfer *trn)
255255
done = trn->actual_length;
256256

257257
while (i < r->blk_count) {
258+
258259
if (trn->type == LIBUSB_TRANSFER_TYPE_ISOCHRONOUS) {
259260
buf_idx = 0;
260261
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)
885886

886887
if (type == USB_ENDPOINT_BULK) {
887888
libusb_fill_bulk_transfer(r->trn, udev->handle, epid,
888-
r->buffer, data_size, usb_dev_comp_req, r, 0);
889+
r->buffer, data_size, usb_dev_comp_cb, r, 0);
889890

890891
} else if (type == USB_ENDPOINT_INT) {
891892
libusb_fill_interrupt_transfer(r->trn, udev->handle, epid,
892-
r->buffer, data_size, usb_dev_comp_req, r, 0);
893+
r->buffer, data_size, usb_dev_comp_cb, r, 0);
893894

894895
} else if (type == USB_ENDPOINT_ISOC) {
895896
libusb_fill_iso_transfer(r->trn, udev->handle, epid,
896897
r->buffer, data_size, framecnt,
897-
usb_dev_comp_req, r, 0);
898+
usb_dev_comp_cb, r, 0);
898899

899900
} else {
900901
UPRINTF(LFTL, "%s: wrong endpoint type %d\r\n", __func__, type);

0 commit comments

Comments
 (0)