Skip to content

Commit

Permalink
adapt to msg api change
Browse files Browse the repository at this point in the history
JIRA: RTOS-792
  • Loading branch information
lukileczo authored and agkaminski committed Mar 21, 2024
1 parent 6da7630 commit cd8cb2a
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 9 deletions.
2 changes: 1 addition & 1 deletion libusb/driver.c
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ static int usb_urbSubmitSync(usb_urb_t *urb, void *data)
if ((ret = msgSend(usbdrv_common.port, &msg)) != 0)
return ret;

return msg.o.io.err;
return msg.o.err;

Check failure on line 116 in libusb/driver.c

View workflow job for this annotation

GitHub Actions / call-ci / build (armv7a7-imx6ull-evk)

'struct <anonymous>' has no member named 'err'

Check failure on line 116 in libusb/driver.c

View workflow job for this annotation

GitHub Actions / call-ci / build (armv7m7-imxrt106x-evk)

'struct <anonymous>' has no member named 'err'

Check failure on line 116 in libusb/driver.c

View workflow job for this annotation

GitHub Actions / call-ci / build (armv7m7-imxrt105x-evk)

'struct <anonymous>' has no member named 'err'

Check failure on line 116 in libusb/driver.c

View workflow job for this annotation

GitHub Actions / call-ci / build (armv7m7-imxrt117x-evk)

'struct <anonymous>' has no member named 'err'
}

Check warning on line 117 in libusb/driver.c

View workflow job for this annotation

GitHub Actions / call-ci / build (armv7a7-imx6ull-evk)

control reaches end of non-void function [-Wreturn-type]

Check warning on line 117 in libusb/driver.c

View workflow job for this annotation

GitHub Actions / call-ci / build (armv7m7-imxrt106x-evk)

control reaches end of non-void function [-Wreturn-type]

Check warning on line 117 in libusb/driver.c

View workflow job for this annotation

GitHub Actions / call-ci / build (armv7m7-imxrt105x-evk)

control reaches end of non-void function [-Wreturn-type]

Check warning on line 117 in libusb/driver.c

View workflow job for this annotation

GitHub Actions / call-ci / build (armv7m7-imxrt117x-evk)

control reaches end of non-void function [-Wreturn-type]


Expand Down
16 changes: 8 additions & 8 deletions usb/usb.c
Original file line number Diff line number Diff line change
Expand Up @@ -219,7 +219,7 @@ static void usb_urbSyncCompleted(usb_transfer_t *t)

msg.type = mtDevCtl;
msg.pid = t->pid;
msg.o.io.err = (t->error != 0) ? -t->error : t->transferred;
msg.o.err = (t->error != 0) ? -t->error : t->transferred;

if (t->direction == usb_dir_in)
msg.o.data = t->buffer;
Expand Down Expand Up @@ -265,17 +265,17 @@ static void usb_msgthr(void *arg)
resp = 1;
switch (msg.type) {
case mtRead:
msg.o.io.err = usb_devsList(msg.o.data, msg.o.size);
msg.o.err = usb_devsList(msg.o.data, msg.o.size);
break;
case mtDevCtl:
umsg = (usb_msg_t *)msg.i.raw;
switch (umsg->type) {
case usb_msg_connect:
msg.o.io.err = usb_handleConnect(&msg, &umsg->connect);
msg.o.err = usb_handleConnect(&msg, &umsg->connect);
break;
case usb_msg_open:
if (usb_handleOpen(&umsg->open, &msg) != 0)
msg.o.io.err = -1;
msg.o.err = -1;
break;
case usb_msg_urb:
ret = usb_handleUrb(&msg, port, rid);
Expand All @@ -284,20 +284,20 @@ static void usb_msgthr(void *arg)
resp = 0;
}
else {
msg.o.io.err = ret;
msg.o.err = ret;
}
break;
case usb_msg_urbcmd:
msg.o.io.err = usb_handleUrbcmd(&msg);
msg.o.err = usb_handleUrbcmd(&msg);
break;
default:
msg.o.io.err = -EINVAL;
msg.o.err = -EINVAL;
USB_LOG("usb: unsupported usb_msg type: %d\n", umsg->type);
break;
}
break;
default:
msg.o.io.err = -EINVAL;
msg.o.err = -EINVAL;
USB_LOG("usb: unsupported msg type\n");
}

Expand Down

0 comments on commit cd8cb2a

Please sign in to comment.